/* Guria Fish Farming — ტელეფონზე გათვლილი (mobile-first) */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --text: #17231d;
  --muted: #5d6b64;
  --line: #d7e0db;
  --brand: #1f5a40;
  --brand-2: #2f7d55;
  --accent: #b8860b;
  --s-green: #2f7d55;
  --s-yellow: #d9a520;
  --s-red: #c0392b;
  --s-critical: #7a1020;
  --s-empty: #c9d3ce;
  --on-status: #ffffff;
  --plan-bg: #fff6dc;
  --plan-line: #e5c66b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05);
  color-scheme: light;
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden ყოველთვის მალავს, display-ის წესების მიუხედავად */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 "Noto Sans Georgian", "Sylfaen", "BPG Arial", system-ui, -apple-system, "Segoe UI", sans-serif;
}
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- ზედა ზოლი */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* ლოგო: კომპანიის სახელი ლამაზი შრიფტით (ინტერნეტის გარეშე — Georgia) */
.brand {
  flex: none; text-decoration: none; white-space: nowrap; line-height: 1;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif; color: var(--brand);
}
.brand-main { font-weight: 700; font-size: 22px; letter-spacing: .3px; }
.brand-sub { font-style: italic; font-weight: 500; font-size: 17px; color: var(--brand-2); }
@media (max-width: 640px) { .brand-main { font-size: 19px; } .brand-sub { font-size: 14px; } }
.brand-tag { font-family: "Noto Sans Georgian", "Sylfaen", system-ui, sans-serif; font-size: 12px; font-weight: 600; color: #fff;
  background: var(--brand); border-radius: 999px; padding: 3px 9px; margin-left: 4px; vertical-align: 3px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); text-decoration: none; font-size: 14px;
}
.nav-item.active { background: var(--surface-2); color: var(--brand); font-weight: 600; }
.nav-item.soon { opacity: .45; cursor: default; }

/* ---------------------------------------------------------------- განლაგება (სალიფსიტე) */
/* კომპიუტერი (≥ 900 px): საჩეკი და აუზები მარცხნივ, პანელი მარჯვნივ, როგორც ფარმინგზე; 1404 px-ზე ვიწრო ფანჯარაში
   მთავარი გვერდი პროპორციულად პატარავდება (app.js → fitHatch). მობილური — ფაილის ბოლოს: 90°-ით მობრუნებული,
   ზემოდან ქვემოთ საჩეკი → პატარა აუზები → დიდი აუზები → პანელი (მფლობელი, 02.11.2026) */
.layout { display: flex; flex-direction: column; gap: 14px; padding: 12px 16px 32px; }
.hatch { min-width: 0; }
.side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; padding: 14px 16px;
    min-width: 1372px; }
}

/* ---------------------------------------------------------------- აუზები */
.big-pools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(6px, 2vw, 18px); }
.small-pools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(4px, 1.5vw, 14px); margin-top: clamp(8px, 2vw, 18px); }

.pool {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  border: 0; padding: 0;
  container-type: inline-size;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--s-green); color: var(--on-status);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25), var(--shadow);
  transition: transform .12s ease;
  text-align: center; line-height: 1.15;
  min-width: 0; overflow: hidden;
}
.pool:hover { transform: scale(1.02); }
.pool:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.pool.yellow { background: var(--s-yellow); color: #2b2205; }
.pool.red { background: var(--s-red); }
.pool.critical { background: var(--s-critical); box-shadow: 0 0 0 4px var(--s-red), var(--shadow); }
.pool.empty { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 3px var(--s-empty); }

.pool .p-no { font-weight: 700; font-size: clamp(12px, 13cqi, 30px); }
.pool .p-batch { font-size: clamp(8px, 6cqi, 12px); opacity: .8; }
.pool .p-t { font-weight: 700; font-size: clamp(12px, 12cqi, 26px); }
.pool .p-line { font-size: clamp(8px, 7.5cqi, 16px); opacity: .95; }
.pool .p-status { font-size: clamp(7px, 6cqi, 12px); font-weight: 600; margin-top: 2px; }
@container (max-width: 120px) {
  .pool .p-batch, .pool .p-avg, .pool .p-status { display: none; }
}
/* პატარა აუზები — ცოტა მსხვილი შრიფტი (ნაკლები სტრიქონი აქვთ) */
.small-pools .pool .p-no { font-size: clamp(13px, 16cqi, 30px); }
.small-pools .pool .p-t { font-size: clamp(13px, 16cqi, 26px); }
.small-pools .pool .p-line { font-size: clamp(9px, 10cqi, 16px); }
@container (max-width: 80px) {
  .pool .p-count, .pool .p-norm { display: none; }
}

.pool-cell { position: relative; min-width: 0; }
.pool-cell .pool { width: 100%; padding-bottom: 7%; }      /* ტექსტი ოდნავ ზემოთ */
/* ნიშნები — წრის კიდეზე, ოთხ კუთხეში (X; ადგილს app.js სვამს %-ით): ნახევარი აუზში შედის. ფერადი ფონი,
   თეთრი ნიშანი და ჩარჩო — ჩანს მწვანე/ყვითელ აუზზეც და თეთრ ფონზეც */
.badges { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.badge {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  width: clamp(18px, 4.2vw, 28px); height: clamp(18px, 4.2vw, 28px); border-radius: 50%; border: 2px solid #fff; padding: 0;
  display: grid; place-items: center;
  font-size: clamp(11px, 2.4vw, 15px); font-weight: 800; line-height: 1;
  background: #555; color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.badge.feed { background: #e08a00; }
.badge.sale { background: #b8920a; }
.badge.grading { background: #6a3fb5; }
.badge.pellet { background: #1565c0; font-size: clamp(9px, 1.9vw, 12px); letter-spacing: -.04em; }
.small-pools .badge { width: clamp(16px, 3.4vw, 22px); height: clamp(16px, 3.4vw, 22px); font-size: clamp(10px, 2vw, 13px); }
.small-pools .badge.pellet { font-size: clamp(8px, 1.6vw, 10px); }

/* ---------------------------------------------------------------- სალიფსიტე: საჩეკი და აუზები */
/* ზოლების და გარე ნაცრისფერი ჩარჩოს გარეშე; აუზები სიგანით იზრდება — 1568 px ეკრანზე დიდი აუზი ≈ 170 px */
.building { display: grid; grid-template-columns: 196px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius);
  background: #eef1ef; overflow: hidden; box-shadow: var(--shadow); }
.room { background: #f6f3ea; padding: 12px 10px 16px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.room-title { font-size: 21px; font-weight: 700; color: #8a5a12; }
/* საჩეკის ტემპერატურა — სენსორიდან, ავტომატურად (მთავარი გვერდის „გათვლის ტემპერატურა“ — ხელით) */
.room-temp { font-size: 17px; font-weight: 700; color: var(--text); margin: 2px 0 12px; }
.room-temp small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
/* ვერტიკალური ინკუბატორი: 8 გამოსაღები თარო */
.inc-body { display: grid; gap: 6px; padding: 10px 12px; background: #cfd7db; border: 2px solid #8d99a3; border-radius: 8px;
  box-shadow: inset 8px 0 0 #b8c2c8, inset -8px 0 0 #b8c2c8, 3px 5px 10px rgba(30, 50, 40, .2); }
.tray { position: relative; display: flex; justify-content: center; align-items: center; padding: 7px 8px 13px;
  border: 2px solid #8d99a3; border-radius: 5px; background: linear-gradient(#fbfcfc, #dde4e8); white-space: nowrap;
  transition: transform .15s ease, border-color .15s; }
.tray b { font-size: 14px; }
.tray .handle { position: absolute; left: 50%; bottom: 4px; width: 46px; height: 6px; margin-left: -23px; border-radius: 3px; background: #97a3ab; }
.tray:hover, .tray:focus-visible { transform: translateX(10px); border-color: var(--brand); outline: none; }
.hall { display: grid; grid-template-columns: .62fr .62fr .04fr 1fr 1fr .07fr 1fr 1fr; grid-template-rows: auto auto auto;
  column-gap: 8px; row-gap: 22px; align-content: center; align-items: center; justify-items: center; padding: 12px; }
.group-title { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.gt-small { grid-column: 1 / 3; grid-row: 1; }
.gt-big { grid-column: 4 / 9; grid-row: 1; }
.tank-cell { grid-column: var(--c); grid-row: var(--r); width: 100%; min-width: 0; }
.tank-cell .pool-cell { width: 100%; }
/* აუზის ფერი — ფარმინგის სქემით (მფლობელი, 02.11.2026): თევზიანი — მწვანე (დატვირთვით ყვითელი, წითელი,
   კრიტიკული — როგორც ფარმინგში), ცარიელი — ნაცრისფერი, საჩეკის ინკუბატორის ფერით */
.hatch .pool.empty { background: #cfd7db; color: #4d5a62; box-shadow: inset 0 0 0 3px #b8c2c8, var(--shadow); }
.hatch .pool .p-no { font-size: clamp(14px, 15cqi, 32px); }
.hatch .pool .p-line { font-size: clamp(9px, 8cqi, 16px); }
.hatch .small .pool .p-no { font-size: clamp(13px, 17cqi, 30px); }
.hatch .small .pool .p-t { font-size: clamp(12px, 14cqi, 24px); }
.hatch .small .pool .p-line { font-size: clamp(10px, 11.5cqi, 15px); }

/* ---------------------------------------------------------------- გვერდითა პანელი */
.date-card, .temp-card:not(:empty), .totals, .alerts:not(:empty), .legend {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.date-card.other-day { background: var(--plan-bg); border-color: var(--plan-line); }
.date-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.date-row { display: flex; gap: 6px; }
.date-input {
  flex: 1; min-width: 0; text-align: center; font-size: 18px; font-weight: 600;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.icon-btn {
  min-width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-size: 20px;
}
.cal-btn { position: relative; font-size: 18px; }
.date-field { display: flex; gap: 6px; }
.date-field input { flex: 1; min-width: 0; }
.date-field .cal-btn { min-width: 42px; height: auto; }
.cal-btn input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.date-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.mode { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.mode.plan { background: var(--plan-line); color: #2b2205; }
.btn-today {
  border: 0; border-radius: 10px; padding: 8px 14px;
  background: var(--brand); color: #fff; font-weight: 600;
}
.btn-today[hidden] { display: none; }

/* გათვლის ტემპერატურა (სალიფსიტე) — საკვების ნორმა ამით ითვლება; „შეცვლა“ იქვე */
.tc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.temp-card .t-label { font-size: 12px; color: var(--muted); }
.temp-card .t-value { font-size: 22px; font-weight: 700; }
.temp-card .t-unit { font-size: 13px; color: var(--muted); font-weight: 400; }
.tc-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.tc-form input { width: 76px; font-size: 16px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tc-form .form-error { flex-basis: 100%; margin: 0; }
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
@media (min-width: 900px) { .totals { grid-template-columns: minmax(0, 1fr); } }
.total { min-width: 0; overflow-wrap: anywhere; }
.total .t-label { font-size: 12px; color: var(--muted); }
.total .t-value { font-size: 22px; font-weight: 700; }
.total .t-unit { font-size: 13px; color: var(--muted); font-weight: 400; }

.alerts { display: grid; gap: 6px; }
.alert { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: #fdecea; color: #7a1020; }

/* ---------------------------------------------------------------- მთავარი გვერდის ბარათები (§9.6) */
/* აუზებსა და მარჯვენა პანელს შორის: პატარა ბარათები, ფართო ეკრანზე — რამდენიმე სვეტად */
.info-cards {
  order: 3; display: grid; gap: 12px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.info-cards:empty { display: none; }
/* ვიწრო კომპიუტერზე შუაში ადგილი არ რჩება — ბარათები აუზების ქვეშაა; ≥1200px — ერთ სვეტად, ერთმანეთის ქვეშ,
   მარჯვენა პანელთან ახლოს; აუზები ცოტა ვიწროვდება, რომ ბარათს მინიმუმ ~300px დარჩეს (ფართო ეკრანზე არ იცვლება) */
@media (min-width: 900px) { .info-cards { grid-column: 1 / 3; grid-row: 2; } }
@media (min-width: 1200px) {
  .farm { width: min(calc((100dvh - var(--topbar, 58px) - 34px) / 1.23), calc(100vw - 700px)); }
  .info-cards {
    grid-column: 2; grid-row: 1; grid-template-columns: minmax(280px, 360px); justify-content: end;
    max-height: calc(100dvh - var(--topbar, 58px) - 28px); overflow-y: auto;     /* როგორც მარჯვენა პანელი — გვერდი არ სქროლავს */
  }
}
.icard {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.icard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.icard-title { font-size: 12px; color: var(--muted); }
.icard-more { font-size: 12px; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.icard-main { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.icard-big { font-size: 22px; font-weight: 700; }
.icard-sub { font-size: 12px; color: var(--muted); }
.icard-pill { margin-left: auto; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--brand); }
.icard-bar { display: flex; height: 6px; margin: 7px 0 8px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.icard-bar i { display: block; height: 100%; }
.icard-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
/* გაიყიდა — აუზის მწვანე; დაგეგმილი — გეგმის ყვითელი (როგორც თარიღის „გეგმა“) */
.icard .f { background: var(--s-green); }
.icard .p { background: var(--plan-bg); box-shadow: inset 0 0 0 1px var(--s-yellow); }
.icard .bar-late { background: var(--s-red); }
.size-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 2px 0; font-size: 13px; }
.size-track { display: flex; height: 8px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.size-track i { display: block; height: 100%; }
.size-val { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.size-val b { font-weight: 400; color: #8a6a10; }
.icard-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; }
.weeks, .week-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.weeks { align-items: end; height: 82px; margin-top: 10px; }
.week { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.week-v { font-size: 12px; font-weight: 600; text-align: center; margin-bottom: 3px; }
.week-v.none { color: var(--muted); font-weight: 400; }
.week-bar { border-radius: 4px 4px 0 0; overflow: hidden; display: flex; flex-direction: column-reverse; }
.week-bar.none { height: 4px; border-radius: 2px; background: var(--surface-2); }
.week-labels { font-size: 11px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); padding-top: 3px; }
.due-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--surface-2); font-size: 13px; }
.due-pill { font-size: 11px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.due-pill.late { background: #fdecea; color: #7a1020; }
.due-pill.soon { background: var(--plan-bg); color: #6b520c; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot.green { background: var(--s-green); } .dot.yellow { background: var(--s-yellow); }
.dot.red { background: var(--s-red); } .dot.critical { background: var(--s-critical); }

/* ---------------------------------------------------------------- აუზის ფანჯარა */
.pool-dialog {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0;
  background: var(--surface); color: var(--text);
  display: none; flex-direction: column;
}
.pool-dialog[open] { display: flex; }
.pool-dialog::backdrop { background: rgba(0, 0, 0, .45); }
@media (min-width: 900px) {
  .pool-dialog {
    width: min(1600px, 97vw); height: 94vh;
    margin: auto; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  }
}
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dlg-title { flex: 1; min-width: 0; }
.dlg-title h2 { margin: 0; font-size: 20px; }
.dlg-sub { font-size: 13px; color: var(--muted); }
.btn-back { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; }

.tabs { display: flex; gap: 6px; padding: 10px 14px 0; }
.tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600;
}
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (min-width: 900px) { .tab { flex: none; padding: 9px 18px; } }

.periods { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; align-items: center; flex-wrap: wrap; }
.chip {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); white-space: nowrap; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--surface-2); border-color: var(--brand-2); color: var(--brand); font-weight: 600; }
.custom-range { display: flex; gap: 6px; align-items: center; }
.custom-range[hidden] { display: none; }
.custom-range input { width: 118px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }

.dlg-body { flex: 1; overflow: auto; padding: 12px 14px 20px; }
.info { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.warn { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--plan-bg); border: 1px solid var(--plan-line); margin-bottom: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.card {
  text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.card[aria-pressed="true"] { border-color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand-2); }
.card .c-label { font-size: 12px; color: var(--muted); }
.card .c-value { font-size: 17px; font-weight: 700; }
.card .c-sub { font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.data th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--muted); z-index: 1; }
table.data th:first-child, table.data td:first-child { position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 2; }
table.data th:first-child { background: var(--surface-2); z-index: 3; }
table.data td.left, table.data th.left { text-align: left; white-space: normal; min-width: 180px; }
table.data tr.fast td { background: var(--plan-bg); }
table.data tr.fast td:first-child { background: var(--plan-bg); }
.ev { display: inline-block; margin: 1px 4px 1px 0; padding: 2px 7px; border-radius: 999px; font-size: 12px; background: var(--surface-2); }
.ev.sale { background: #fbf0cc; color: #6b5100; }
.ev.out { background: #ece4fb; color: #4d2c91; }
.ev.stocking, .ev.in { background: #def3e7; color: #1f5a40; }
.ev.treatment { background: #e0ecfa; color: #1d4f86; }
.ev.dead { background: #f3e2e2; color: #7a1020; }
.ev.adjustment, .ev.correction { background: #e6eaf0; color: #3a4a5c; }
.neg { color: var(--s-red); font-weight: 600; }
.empty-note { padding: 30px 10px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- ფორმები და პანელები */
.tabs { flex-wrap: wrap; }
.tab { flex: 1 1 40%; }
.tab.action { background: var(--surface-2); font-weight: 500; }
.tab.action[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-sep { display: none; }
@media (min-width: 900px) {
  .tab { flex: none; }
  .tab-sep { display: block; width: 1px; background: var(--line); margin: 4px 6px; }
}
.periods[hidden] { display: none; }

.page { max-width: 1100px; margin: 0 auto; padding: 12px 16px 40px; }
.page[hidden] { display: none; }
.page-head h1 { font-size: 22px; margin: 6px 0; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 12px 0; box-shadow: var(--shadow);
}
.dlg-body .panel { box-shadow: none; }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.form .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
/* რეალიზაციის გეგმა: სია მარცხნივ (ფართოდ), ფორმები მარჯვნივ — ვერტიკალურად, ერთ სვეტად */
#page-sales { max-width: 1400px; }
.sales-cols { display: grid; gap: 14px; align-items: start; }
.sales-main, .sales-side { min-width: 0; }
@media (min-width: 1000px) { .sales-cols { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (min-width: 1200px) {                       /* კომპიუტერზე ფორმები ეკრანის ზედა მარჯვენა კუთხეშია */
  #page-sales { max-width: none; }
  .sales-main { width: 100%; max-width: 1100px; justify-self: center; }
}
.sales-side .form .grid { grid-template-columns: minmax(0, 1fr); }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form label.wide { margin-top: 10px; }
.form input, .form select, table.lines input, table.lines select {
  font: inherit; font-size: 16px; color: var(--text);
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  min-width: 0; width: 100%;
}
.form input:disabled { background: var(--surface-2); color: var(--muted); }
table.lines td { vertical-align: middle; }
table.lines input, table.lines select { min-width: 110px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 10px 16px; font-weight: 600; min-height: 44px;
}
.btn.small { padding: 6px 10px; min-height: 34px; font-weight: 500; font-size: 13px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--s-red); border-color: var(--s-red); color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger-ghost { color: var(--s-red); border-color: color-mix(in srgb, var(--s-red) 40%, var(--line)); }
td.actions { white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
#tr-planned td { white-space: normal; }
#tr-planned td.actions { width: 1%; min-width: 120px; }
#tr-planned td.actions .btn { display: block; width: 100%; margin: 0 0 6px; }
#tr-planned td .ev.short, #tr-planned td .ev.over { display: inline-block; margin-top: 4px; font-weight: 600; }
.calc { font-size: 14px; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.form-error { margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; background: #fdecea; color: #7a1020; font-size: 14px; }
.form-error[hidden] { display: none; }
.confirm {
  margin: 10px 0; padding: 12px; border-radius: 12px;
  border: 1px solid var(--s-red); background: color-mix(in srgb, var(--s-red) 8%, var(--surface));
}
.confirm p { margin: 0 0 8px; font-weight: 600; }
.confirm .reason { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.confirm .reason input { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.confirm .check { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.confirm .check input { width: 20px; height: 20px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
td.changed { color: #b26b00; font-weight: 700; }
.cap-mark { color: #b26b00; font-weight: 700; white-space: nowrap; }
.badge { cursor: pointer; }

/* ---------------------------------------------------------------- დღის აღრიცხვა */
.role { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: none; }
.role select { font: inherit; font-size: 13px; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
@media (max-width: 600px) { .role span { display: none; } .topbar { gap: 8px; padding: 8px 10px; } }
.date-row.narrow { max-width: 360px; margin: 8px 0; }
.status { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; margin: 4px 0; }
.status.plan { background: var(--plan-bg); border: 1px solid var(--plan-line); }
.status.warn { background: #fdecea; color: #7a1020; }
.status.ok { background: #def3e7; color: #1f5a40; }

.pool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 12px 0; }
.pool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow);
}
.pool-card header { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.pool-card .muted { font-size: 12px; color: var(--muted); }
.pool-card .norm { font-size: 14px; }
.pool-card.fasting { border-color: var(--plan-line); background: var(--plan-bg); }
.pool-card.alarm { border-color: var(--s-red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--s-red) 35%, transparent); }
.fast-note { font-size: 13px; font-weight: 600; color: #8a6200; }
.pool-card .inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pool-card label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pool-card input {
  font: inherit; font-size: 18px; text-align: center; padding: 10px 4px; min-width: 0; width: 100%;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
}
.pool-card input:disabled { background: var(--surface-2); }
.diff { font-size: 13px; color: var(--muted); }
.pos { color: #8a6200; } b.neg { color: var(--s-red); }
textarea { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); width: 100%; }
.actions-bar {
  position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%);
}
.btn.big { min-height: 52px; font-size: 16px; padding: 12px 22px; flex: 1 1 200px; }
.op-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
/* ცხრილში გახსნილი დადასტურების ფორმა ცხრილს არ აფართოებს — ტექსტი ახალ ხაზზე გადადის */
table.data tr.confirm-row td { white-space: normal; text-align: left; position: static; }
select.pending-role { outline: 2px solid var(--plan-line); background: var(--plan-bg); }
/* მომხმარებლები და უფლებები */
table.users tr.edit-row td { background: var(--plan-bg); }
table.users tr.edit-row input, table.users tr.edit-row select { width: 100%; min-width: 120px; }
table.users tr.edit-tools td { background: var(--plan-bg); padding-top: 0; }
table.perms-table tr.grp td { background: var(--surface-2); font-weight: 700; color: var(--muted); font-size: .85em; }
.pm { display: inline-block; min-width: 2.4em; padding: 2px 8px; border-radius: 6px; border: 1px solid transparent; font-weight: 700; line-height: 1.4; }
button.pm { cursor: pointer; }
.pm-y { background: #e3f2e6; color: #1e6b35; }
.pm-w { background: #fff3d6; color: #8a5a00; }
.pm-n { background: var(--surface-2); color: var(--muted); }
.pm.changed { outline: 2px solid var(--plan-line); outline-offset: 1px; }
.perms-bar { justify-content: flex-end; gap: 10px; align-items: center; }
.confirm-form { padding: 10px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.confirm-form .check { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: 14px; color: var(--text); }
.confirm-form .check input { width: 20px; height: 20px; }
.remaining[hidden] { display: none; }

/* ---------------------------------------------------------------- ოპერაციების ჟურნალი */
.journal-filters select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.j-row { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.j-row.cancelled { opacity: .6; }
.j-row.cancelled .j-sum { text-decoration: line-through; }
.j-head {
  width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px;
  display: grid; grid-template-columns: 92px auto 1fr auto; gap: 10px; align-items: center;
}
.j-head:hover { background: var(--surface-2); }
.j-date { font-variant-numeric: tabular-nums; font-weight: 600; }
.j-kind { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.k-sale { background: #fbf0cc; color: #6b5100; }
.k-transfer, .k-grading { background: #ece4fb; color: #4d2c91; }
.k-stocking { background: #def3e7; color: #1f5a40; }
.k-eggs { background: #fde3d3; color: #8c3a12; }        /* სალიფსიტე: ქვირითის ჩასმა */
.k-hatch { background: #fbf0cc; color: #6b5100; }
.k-daily { background: #e3eef8; color: #1d4b73; }
.k-correction, .k-adjustment { background: #e6eaf0; color: #3a4a5c; }
.j-sum { font-size: 14px; min-width: 0; }
.j-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .j-head { grid-template-columns: auto 1fr; }
  .j-sum { grid-column: 1 / -1; }
  .j-meta { grid-column: 1 / -1; }
}
.j-detail { padding: 4px 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.j-detail[hidden] { display: none; }
.j-who { font-size: 13px; color: var(--muted); margin-top: 8px; }
.j-history ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* ---------------------------------------------------------------- საკვები */
.muted { color: var(--muted); font-size: 12px; }
form.policy { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.policy select, form.policy input, .order input, tr[data-route] input, #mv-product {
  font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
form.policy input { width: 64px; }
tr[data-route] input { width: 80px; }
.order { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.order.late { border-color: var(--s-red); }
.order-head { font-size: 14px; margin-bottom: 8px; }
.order .recv-date { width: 210px; }
details > summary.btn { display: inline-block; list-style: none; margin-top: 10px; cursor: pointer; }
details > summary.btn::-webkit-details-marker { display: none; }
details[open] > summary.btn { margin-bottom: 10px; }
tr.cancelled-row td { opacity: .5; text-decoration: line-through; }

/* ---------------------------------------------------------------- პარამეტრები */
label.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
label.inline select, label.inline input, #t-form input {
  font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text);
}
label.inline input { width: 120px; }
#t-form input { width: 80px; }
table.norms td.ours, table.norms th.ours { background: color-mix(in srgb, var(--brand-2) 10%, var(--surface)); }
table.norms input { width: 84px; font: inherit; font-size: 15px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); text-align: right; }
table.norms input:disabled { background: transparent; border-color: transparent; }
.save-norms { margin-top: 10px; align-items: end; }
.save-norms label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.save-norms input { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.versions { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }

/* ---------------------------------------------------------------- მკურნალობა */
.badge.treatment { background: #c62828; }
.treat-note { font-size: 13px; padding: 6px 8px; border-radius: 8px; background: #e3eef8; color: #1d4b73; }
.pool-checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.pool-checks .chip { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pool-checks input { width: 18px; height: 18px; }

.sub { margin: 16px 0 8px; font-size: 15px; }
.filters .chip input { width: 16px; height: 16px; vertical-align: -2px; }
.filters label.chip { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* ---------------------------------------------------------------- რეპორტები */
.page-tabs { padding: 0; margin-bottom: 10px; }
#v-form .grow { flex: 1 1 260px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
#r-pool, .custom-range input { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); }
td.pos { color: #2f7d55; } td.neg { color: var(--s-red); }

/* დღის აღრიცხვა — საწყობის ბარათები */
.wh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wh-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.wh-grid { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.wh-grid .h { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.wh-grid .t { font-size: 13px; font-weight: 600; padding-right: 2px; }
.wh-card output.need small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.wh-card output.need { font-size: 18px; font-weight: 700; text-align: center; padding: 9px 4px; border-radius: 10px;
  background: var(--plan-bg); border: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.wh-card input { font: inherit; font-size: 18px; text-align: center; padding: 9px 4px; width: 100%; min-width: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
ul.plain { margin: 0; padding-left: 18px; }

#s-pool { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); }

/* მობილურზე მიმღები აუზების ხაზები — ბარათებად, ჰორიზონტალური სქროლის გარეშე */
@media (max-width: 640px) {
  table.lines.stack thead { display: none; }
  table.lines.stack, table.lines.stack tbody { display: block; }
  table.lines.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
  table.lines.stack td { display: block; position: static; padding: 0; border: 0; text-align: left; background: none; }
  table.lines.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
  table.lines.stack td.l-kg { align-self: end; padding-bottom: 8px; font-weight: 600; }
  table.lines.stack td.l-act { grid-column: 1 / -1; text-align: right; }
  table.lines.stack input, table.lines.stack select { min-width: 0; width: 100%; }
}
.feed-label { display: inline-block; margin-top: 2px; font-weight: 600; color: var(--text); }
.wh-card .dual { display: grid; gap: 4px; }
.wh-card .dual label, .wh-card .kg-only { position: relative; display: block; }
.wh-card .kg-only { align-self: center; }
.wh-card .dual small, .wh-card .kg-only small { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--muted); pointer-events: none; }
.wh-card .dual input, .wh-card .kg-only input { padding-right: 26px; }
.wh-card .dual input.bag { font-weight: 700; }
table.data td.feed-col { white-space: nowrap; min-width: 0; }

/* აუზის ისტორია: ცხრილი თავის ფანჯარაში სქროლავს — სათაურები ზემოთ რჩება, თარიღი მარცხნივ */
.hist-wrap { max-height: 70vh; overflow: auto; }
.hist-wrap table.data th { top: 0; white-space: normal; vertical-align: bottom; }
/* ყველა სვეტი ეტევა: ვიწრო შუალედები, საკვების დასახელება ორ ხაზზე, ოპერაციები — სრულად (ტექსტი გადადის ახალ ხაზზე) */
.hist-wrap table.data th, .hist-wrap table.data td { padding: 7px 8px; }
.hist-wrap table.data td.feed-col { white-space: normal; min-width: 110px; }
table.data td.ops { min-width: 230px; }
table.data td.ops .ev { white-space: normal; }
/* გეგმის ახსნა: % და რომელი დღიდან, მეშოკები — პატარა ხაზით ქვემოთ; % შეცვლის დღე — გამოყოფილი */
.hist-wrap td .sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.hist-wrap td.pct-cell { color: var(--text, inherit); }
.hist-wrap td.pct-cell.chg { font-weight: 700; color: #6b5100; background: #fbf0cc; }
.cards.mini { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; margin-bottom: 8px; }
.cards.mini .card { padding: 6px 9px; border-radius: 10px; }
.cards.mini .c-label { font-size: 11px; }
.cards.mini .c-value { font-size: 14px; }
.cards.mini .c-sub { font-size: 11px; }
@media (min-width: 900px) { .layout > .side { grid-column: 2; } .hatch { grid-column: 1; } }   /* სალიფსიტე: 2 სვეტი */
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card .card-btn { display: block; width: 100%; margin-top: 8px; text-align: center; text-decoration: none; }

/* შესვლა */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%); display: grid; gap: 14px; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.login-brand { font-family: "Playfair Display", Georgia, serif; color: var(--brand); text-align: center; margin-bottom: 6px; }
.login-brand .brand-main { font-size: 30px; } .login-brand .brand-sub { font-size: 22px; }
.login-card label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.login-card input { font: inherit; font-size: 17px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.user-box { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.user-name { font-size: 14px; font-weight: 600; color: var(--brand); white-space: nowrap; }
@media (max-width: 640px) { .user-name { display: none; } }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 48px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 38px;
  border: 0; background: none; font-size: 18px; border-radius: 8px; }
.pw-eye:hover { background: var(--surface-2); }

/* პარამეტრები: ბარათები ხატულებით */
.param-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.param-tile {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 3px;
  padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; transition: transform .12s ease, border-color .12s ease;
}
.param-tile:hover { transform: translateY(-2px); border-color: var(--brand-2); }
.pt-icon { grid-row: 1 / 4; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; background: var(--surface-2); }
.pt-title { font-weight: 700; font-size: 16px; color: var(--brand); }
.pt-desc { font-size: 13px; color: var(--muted); }
.pt-value { font-size: 13px; font-weight: 600; color: var(--brand-2); min-height: 1em; }
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-head h1 { margin: 0; }
.sec-icon { font-size: .9em; }
.sec-head a.btn { text-decoration: none; color: var(--text); }
table.data tr.plus-row td { background: var(--surface-2); }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
#d-list select { max-width: 190px; }

/* ყველა გრძელ ცხრილში ქუდი (სვეტების სათაურები) და პირველი სვეტი სქროლისას ჩანს.
   ცხრილი საკუთარ ფანჯარაში სქროლავს (ფორმის ცხრილები — გამონაკლისი) */
.table-wrap:not(:has(> table.lines)) { max-height: 72vh; overflow: auto; }

/* საკვები: ყოველდღიური ნაშთი (მარცხნივ) + შეტყობინებები და შეკვეთები (მარჯვნივ) */
.feed-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .feed-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.feed-side { display: grid; gap: 12px; min-width: 0; }
.feed-side > * { min-width: 0; }                       /* მარჯვენა სვეტი 320 პქს-ს არ სცდება (გვერდის ჰორიზ. გადახვევა) */
.feed-side table.lines { width: 100%; table-layout: fixed; }
.feed-side table.lines select, .feed-side table.lines input { width: 100%; min-width: 0; }
@media (max-width: 1099px) { .feed-side { order: -1; } }
.feed-wrap { max-height: calc(100dvh - 230px) !important; }
.feed-sched th.grp { text-align: center; border-left: 2px solid var(--line); white-space: normal; min-width: 150px; color: var(--text); }
.feed-sched th.grp.dim { color: var(--muted); }
.feed-sched .g1 { border-left: 2px solid var(--line); }
.feed-sched thead tr.sub th:first-child { left: auto; z-index: 1; }
.feed-sched td.in { color: #2f7d55; font-weight: 600; }
.feed-sched td.low { background: #fff3cd; color: #7a5a00; font-weight: 600; }
.feed-sched td.out { background: #fdecea; color: #a11d2b; font-weight: 700; }
.alert-box { border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.45; background: var(--surface-2); }
.alert-box.late { background: #fdecea; color: #7a1020; }
.alert-box.soon { background: #fff3cd; color: #6b4e00; }
.order-mini { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.order-mini summary { cursor: pointer; list-style: none; line-height: 1.45; }
.order-mini .order { margin-top: 8px; }
.feed-side .new-order { margin-top: 10px; }
.feed-side .new-order summary { display: block; text-align: center; }

/* საკვების მომწოდებლები */
.sup-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-bottom: 12px; }
.sup-card { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); }
.sup-card.on { border: 2px solid var(--brand-2); }
.sup-card .muted { font-size: 12px; }
.sup-badge { display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.sup-badge.st-active { background: #def3e7; color: #1f5a40; }
.sup-badge.st-review { background: #fff3cd; color: #6b4e00; }
#page-feed { max-width: 1700px; }
.sup-card .sup-badge { justify-self: start; }
.to-receive { background: #fff3cd; color: #6b4e00; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.count-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 12px; text-align: center; }
a.tab { text-decoration: none; color: inherit; }
.pc-norm { flex-wrap: wrap; gap: 8px; align-items: center; }
.pc-norm .chip { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* დაუხურავი დღეები */
.od { border-radius: var(--radius); padding: 10px 12px; font-size: 13px; }
.od.ok { background: #def3e7; color: #1f5a40; }
.od.late { background: #fdecea; color: #7a1020; border: 1px solid #f0b4b4; }
.od h4 { margin: 0 0 6px; font-size: 14px; }
.od-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #f0c9c9; color: inherit; text-decoration: none; }
.od-row:first-of-type { border-top: 0; }
.od-row:hover { text-decoration: underline; }
.od-today { color: var(--muted); }
.od-st { font-size: 12px; text-align: right; }
.od-btn { display: block; margin-top: 8px; text-align: center; background: #a11d2b; color: #fff; border-radius: 10px; padding: 8px; text-decoration: none; font-weight: 600; }
.page-head .od { margin: 8px 0; }
.open-days:empty { display: none; }
.od a.od-btn { color: #fff; }
.confirm.action { border-color: var(--brand-2); background: #eef7f1; }
.confirm.action .check { font-weight: 600; }

/* საკვები: მარაგი დღეს (ქუდი), გადათვლა, ინვოისი */
.stock-head .cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 6px; }
.stock-head .card.low { background: #fff3cd; border-color: #f0d58a; }
.stock-head .card.out { background: #fdecea; border-color: #f2b8b5; }
span.in { color: #1f7a4d; font-weight: 600; }
#count-panel .filters { align-items: center; }
.count-box { margin-bottom: 10px; }
.count-box > summary { display: inline-block; list-style: none; cursor: pointer; }
.count-box > summary::-webkit-details-marker { display: none; }
.count-box > summary.overdue { background: #fdecea; color: #7a1020; border-color: #f2b8b5; }
.count-box[open] > summary { margin-bottom: 8px; }
#count-period { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.inv-form { margin-top: 6px; min-width: 260px; }

/* დირექტორს — რა ელოდება დასტურს */
.pending { border: 1px solid #f0d58a; background: #fff8e1; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.pending-title { font-weight: 700; margin-bottom: 6px; }
.pending-item { display: block; padding: 6px 0; border-top: 1px solid #f3e3b0; font-size: 13px; color: inherit; text-decoration: none; }
.pending-item:hover { text-decoration: underline; }

/* საკვები არ დაემთხვა (საწყობი ↔ აუზები) — წითლად */
.wh-card.mismatch { border-color: #c62828; background: #fdecea; }
.mismatch-box { border: 1px solid #f2b8b5; background: #fdecea; color: #7a1020; border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: 13px; }
.mismatch-box ul { margin: 4px 0; }
.wh-add { margin-top: 8px; }
.pending-item.mm { color: #7a1020; }

/* ჟურნალი: საკვები არ დაემთხვა / შენიშვნა — სანამ არ გასწორდება */
.j-row.attention > .j-head { background: #fff1e6; border-left: 4px solid #d35400; }
.j-flag { color: #a04000; font-size: 12px; white-space: nowrap; }

/* დღის აღრიცხვა: შეუვსებელი უჯრა — ჩაწერეთ 0 */
input.need-zero { border-color: #c62828 !important; background: #fdecea !important; box-shadow: 0 0 0 2px rgba(198, 40, 40, .2); }
input.need-zero::placeholder { color: #c62828; }

/* დღის აღრიცხვა: „✕ არ ეძლევა“ (მკურნალობა / შიმშილობა) და ერთჯერადი კვება */
.x-cell { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.x-box {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 10px;
  border: 1px dashed #9aa5a0; color: #5b6762; font-weight: 700; font-size: 20px; line-height: 1.1;
  background: repeating-linear-gradient(135deg, #eef1ef 0 8px, #e2e7e4 8px 16px); cursor: not-allowed; user-select: none;
}
.x-box span { font-size: 12px; font-weight: 600; text-align: left; }
.x-box small { font-weight: 500; }
label.treat-feed { color: #c62828; font-weight: 700; }
label.treat-feed input { border-color: #c62828; box-shadow: 0 0 0 2px rgba(198, 40, 40, .15); }

/* მომხმარებლის ღილაკი და მენიუ (პაროლის შეცვლა, გასვლა) */
.user-box { position: relative; }
.user-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.user-btn:hover { background: var(--surface-2); }
.user-btn .caret { font-size: 11px; opacity: .7; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.um-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 14px; }
.um-item { display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: none;
  font-size: 14px; cursor: pointer; color: inherit; }
.um-item:hover { background: var(--surface-2); }
.pw-dialog { border: 0; border-radius: 14px; padding: 18px; width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.pw-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.pw-dialog label { display: block; margin-bottom: 10px; }

/* რეალიზაციის სიმულაცია */
.sim-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.sim-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #ede7f6; color: #4527a0; font-size: 12px; font-weight: 600; }
.sim-lock { padding: 8px 10px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; font-size: 13px; }
.card.warn { background: #fff3cd; } .card.bad { background: #fdecea; }
.sim-months td.sum { font-weight: 700; } .sim-months td.sum.ok { background: #c8e6c9; } .sim-months td.sum.low { background: #fff3cd; }
.sim-months td.sum.over { background: #f8c9c4; color: #7a1020; }      /* თვეში 50 ტ-ზე მეტი — პრობლემა */
tr.locked td { background: #f4f7f5; }
.ctr { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 12px; margin: 1px; }
.ctr.ok { background: #e8f5e9; color: #1b5e20; } .ctr.miss { background: #fdecea; color: #7a1020; }
.sim-map td { text-align: center; font-size: 12px; white-space: nowrap; } .sim-map td small { display: block; font-size: 10px; opacity: .75; }
.sim-map td.s-yellow { background: #fff3cd; } .sim-map td.s-red { background: #f8c9c4; } .sim-map td.s-critical { background: #c62828; color: #fff; } .sim-map td.s-green { background: #e8f5e9; }
.sim-problems { border-color: #f2b8b5; }
.sim-filter { align-items: center; }
.sim-filter .date-field { width: 175px; }
/* „აუზები სცენარით“: მთავარი გვერდის აუზები მარცხნივ, თარიღი / ჯამები / კვირის მოვლენები მარჯვნივ */
.sim-pools { display: grid; gap: 16px; align-items: start; }
.sim-farm, .sim-side { min-width: 0; }
.sim-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sim-side .date-input { min-width: 0; flex: 1; }
.sim-side .date-foot { flex-wrap: wrap; gap: 6px; }
.sim-side .date-foot .chip { padding: 4px 10px; font-size: 12px; }
.sim-side .panel { margin: 0; }
.sim-side .sim-week { order: 3; }                  /* ჯამების შემდეგ, ლეგენდამდე */
.sim-week ul { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.alert.sim-watch { background: #fff3e0; color: #7a4100; }
@media (min-width: 900px) { .sim-pools { grid-template-columns: minmax(0, 620px) minmax(260px, 1fr); } }
.ev { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-2); }
.ev-stocking { background: #e3f2fd; color: #0d47a1; } .ev-sale { background: #e8f5e9; color: #1b5e20; } .ev-freeze { background: #e0f7fa; color: #006064; }
.ev-transfer, .ev-grading { background: #ede7f6; color: #4527a0; } .ev-contract { background: #fff3e0; color: #e65100; }
tr.best td { background: #fffde7; }
.sim-req { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
/* სცენარის შეცვლა გვერდიდან: დაცვა, წესები, ხელსაწყოები */
.sim-prot { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff3e0; color: #7a4100; font-size: 12px; font-weight: 600; }
.sim-rules h3 { margin-bottom: 6px; }
.sim-rule-list { margin: 0; padding-left: 20px; display: grid; gap: 3px; font-size: 13px; }
.sim-note { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.sim-tools { border-color: #b39ddb; }
.sim-flash { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; font-size: 13px; }
.sim-tool-tabs { align-items: center; }
.sim-undo { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.sim-check span { display: flex; gap: 8px; align-items: center; color: var(--text); min-height: 40px; }
.sim-check input { width: 20px; height: 20px; }
.sim-lines { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; justify-items: start; }
.sim-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sim-line select, .sim-line input { min-height: 38px; width: 130px; }
.form .sim-line-all { display: inline-flex; gap: 4px; align-items: center; color: var(--text); font-size: 13px; }
.sim-line .sim-line-all input { width: 18px; min-height: 0; height: 18px; }
.sim-pick { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0 10px; }
.sim-pick legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.form .sim-pool-pick { display: inline-flex; gap: 4px; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 13px; }
.sim-pool-pick input { width: 16px; height: 16px; }
.sim-preview { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sim-preview h4 { margin: 0 0 8px; }
tr.editing td { background: #ede7f6; }
td.nowrap { white-space: nowrap; }

/* გადაყვანა/დახარისხება: ზედმეტობა; შეტყობინება დირექტორს */
.surplus-box { border: 1px solid #90caf9; background: #e3f2fd; color: #0d47a1; border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: 13px; }
.pending-item.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pending-item.notice a { color: inherit; flex: 1 1 200px; }
.pending-item.notice.short a { color: #7a1020; font-weight: 600; } .pending-item.notice.over a { color: #0d47a1; font-weight: 600; }

.src-rest { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); margin: 6px 0; }
b.blue, .blue { color: #0d47a1; }
.ev.short { background: #fdecea; color: #7a1020; } .ev.over { background: #e3f2fd; color: #0d47a1; }
.pm.locked { opacity: .55; cursor: not-allowed; }

/* რეალიზაცია თვეებით: თვის სათაური, ჯამი, პერიოდის ჯამი */
.sales-months tr.sm-month td { background: var(--surface-2); font-weight: 700; text-align: left; }
.sales-months tr.sm-sum td { font-weight: 700; border-top: 2px solid var(--line); }
.sales-months tr.sm-sum td:first-child, .sales-months tr.sm-total td:first-child { text-align: left; }
.sales-months tr.sm-total td { font-weight: 800; background: #e8f5e9; }
.sales-months tr.sm-plan td { color: var(--muted); }
.sales-months td small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.sales-months td.sm-kg { font-weight: 700; }
.sales-months th.sz, .sales-months td.sz { text-align: center; }    /* ზომის სვეტები: სათაური და წონა — ცენტრში */


/* მობილური — პირველი გვერდი 90°-ით მობრუნებული (მფლობელი, 02.11.2026): ზემოდან ქვემოთ საჩეკი → პატარა აუზები →
   დიდი აუზები → პანელი. აუზების ზედა რიგი — მარჯვენა სვეტი, ქვედა — მარცხენა (app.js → --mc/--mr) */
@media (max-width: 899px) {
  .building { grid-template-columns: minmax(0, 1fr); }
  .room { padding: 12px 16px 16px; }
  .inc-body { width: min(100%, 260px); margin: 0 auto; }
  .hall { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(6, auto) 2px auto auto;
    column-gap: 12px; row-gap: 14px; padding: 14px 12px 18px; }
  .tank-cell { grid-column: var(--mc); grid-row: var(--mr); display: flex; justify-content: center; }
  .tank-cell.small .pool-cell { width: 72%; }
  .gt-small { grid-column: 1 / 3; grid-row: 1; }
  .gt-big { grid-column: 1 / 3; grid-row: 4; margin-top: 6px; }
}
/* სალიფსიტე — დღის აღრიცხვა: საათობრივი კვების ცხრილი (მფლობელი, 02.11.2026). თეთრი; სვეტები — კვების საათები,
   თითო აუზს ორი სტრიქონი („უწევს“ / „მისცეს“); ✕ — ფარმინგის „არ ეძლევა“ ფერით (ზოლიანი ნაცრისფერი) */
.feed-panel h3 { margin-top: 0; }
.feed-table { background: #fff; }
.feed-table th, .feed-table td { text-align: center; white-space: nowrap; padding: 4px 3px; }
.feed-table th:first-child, .feed-table td.fpool-cell { text-align: left; }
.feed-table tbody.fpool { border-bottom: 2px solid var(--line); }
.feed-table tr.fr-plan td { border-bottom: 0; }
.feed-table td.fpool-cell { min-width: 150px; padding-left: 8px; vertical-align: top; border-right: 1px solid var(--line); }
.feed-table td.fpool-cell .muted { font-size: 12px; }
.feed-table td.flab { font-size: 11px; color: var(--muted); text-align: left; }
.feed-table td.fp { color: var(--muted); font-size: 13px; }
.feed-table input[data-fp] { width: 58px; padding: 5px 3px; text-align: center; font-size: 14px; }
.feed-table .fx { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 30px; border-radius: 6px;
  border: 1px dashed #9aa5a0; color: #5b6762; font-weight: 700; font-size: 14px;
  background: repeating-linear-gradient(135deg, #eef1ef 0 6px, #e2e7e4 6px 12px); cursor: not-allowed; user-select: none; }
.feed-table td.fsum { font-weight: 700; border-left: 1px solid var(--line); min-width: 64px; }
.feed-table td.fsum.ok { color: var(--s-green); }
.feed-table td.fsum.over { color: var(--s-red); }
.feed-table td.fsum.under { color: #8a6200; }
.feed-table td.fm { border-left: 1px solid var(--line); }
.feed-table td.fm input { width: 54px; padding: 5px 3px; text-align: center; }
.feed-table td.fm small { color: var(--muted); margin: 0 4px 0 2px; }
.feed-table tbody.fpool.fast td.fpool-cell { background: var(--plan-bg); }/* დღის აღრიცხვა — საათობრივი ცხრილი 12 სვეტამდე: გვერდი ფართოა, უჯრები კომპაქტური (1568 px ეკრანზე მთლიანად ჩანს) */
/* 1920 px ეკრანზე — 16 კვების სვეტამდე გადახვევის გარეშე (მფლობელი, 02.11.2026: 12-ჯერადი კვება + სხვა აუზის საათები) */
#page-daily { max-width: 1840px; }
.feed-table th, .feed-table td { padding: 3px 2px; }
.feed-table td.fpool-cell { min-width: 132px; }
.feed-table input[data-fp], .feed-table .fx { width: 52px; }
.feed-table td.fm input { width: 46px; }
.feed-table td.fm small { margin: 0 3px 0 1px; }.feed-table td.fpool-cell { white-space: normal; max-width: 150px; }

/* კვების დროები (აუზის ფანჯარა → საკვები): თითო დრო — ცალკე ველი ✕-ით; „+ კვების დროის დამატება“; რამდენჯერადი */
.fs-label { font-size: 13px; color: var(--muted); margin: 8px 0 6px; }
.fs-times { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-time { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.fs-time input { width: 68px; border: 0; padding: 8px 6px 8px 10px; font-size: 16px; font-weight: 600; text-align: center; background: transparent; }
.fs-time input.bad { color: var(--s-red); background: #fdecea; }
.fs-x { border: 0; border-left: 1px solid var(--line); background: var(--surface-2); color: var(--muted); padding: 8px 10px; font-size: 13px; }
.fs-x:hover { color: var(--s-red); }
.fs-row { align-items: center; gap: 12px; margin-top: 10px; }
.fs-count { font-size: 15px; }
.fs-count b { font-size: 20px; color: var(--brand); }
/* მკურნალობის გვერდი (სალიფსიტე): ზემოთ ვაქცინაცია, ქვემოთ — მკაფიოდ გამოყოფილი მკურნალობა */
.page-head.topic-break { margin-top: 40px; padding-top: 22px; border-top: 4px solid var(--line); }
/* საიტების გადამრთველი: ლოგოზე დაჭერით — Guria Fish Farming / სალიფსიტე (მოგვიანებით Production) */
.topbar .brand { cursor: pointer; }
.brand-caret { font-family: system-ui, sans-serif; font-size: 13px; color: var(--muted); margin-left: 4px; }
.site-menu { position: absolute; top: calc(100% - 4px); left: 12px; z-index: 20; min-width: 300px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.site-menu .sm-head { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; }
.site-menu .sm-item { display: flex; align-items: baseline; gap: 4px; padding: 10px 12px; border-radius: 8px; text-decoration: none;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif; color: var(--brand); white-space: nowrap; }
.site-menu .sm-item:hover { background: var(--surface-2); }
.site-menu .sm-item.here { background: var(--surface-2); }
.site-menu .sm-here { margin-left: auto; padding-left: 12px; font-family: system-ui, sans-serif; font-size: 12px; color: var(--s-green); }
/* მომხმარებლები — ერთიანი სია ყველა საიტისთვის: საიტის სვეტები, „პირველი საიტი“, საიტების ბარათები */
.users th.u-site, .users td.u-site { text-align: center; border-left: 1px solid var(--line); white-space: nowrap; }
.u-home { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; white-space: nowrap; }
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.site-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.site-card.first { border: 2px solid var(--brand); background: #f3f9f5; }
.site-card .sc-name { font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.site-card .sc-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; color: var(--text); }
.site-card .sc-row select { flex: 1; min-width: 0; }
.site-card .sc-tag { font-size: 12px; color: var(--brand); display: none; }
.site-card.first .sc-tag { display: inline; }
.site-menu .sm-home { color: var(--muted); }
/* ---------------------------------------------------------------- სალიფსიტე: ქვირითი ინკუბატორში (eggs.js, 02.11.2026)
   ეტაპის ფერები: ქვირითი — ღია ორაგულისფერი, თვალიანი — ნარინჯისფერი, იჩეკება — ქარვისფერი, ლარვა — ღია მწვანე,
   აუზში გადასაყვანად — მწვანე (როგორც აუზი თევზით); ცარიელი თარო — ნაცრისფერი, როგორც იყო */
:root { --st-egg: #f7cfb2; --st-eyed: #f0a070; --st-hatching: #e8c04e; --st-larva: #a9d9b8; --st-ready: #2f7d55; }
.st-egg { --st: var(--st-egg); } .st-eyed { --st: var(--st-eyed); } .st-hatching { --st: var(--st-hatching); }
.st-larva { --st: var(--st-larva); } .st-ready { --st: var(--st-ready); }
.tray.full { justify-content: flex-start; gap: 8px; padding: 5px 8px 12px; background: linear-gradient(#fff, var(--st)); border-color: color-mix(in srgb, var(--st) 70%, #6d5a4c); }
.tray.full.st-ready { color: #fff; }
.tray.full b { font-size: 16px; min-width: 14px; }
.tr-info { display: flex; flex: 1; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-dd { font-weight: 700; }
.dot.st-egg, .dot.st-eyed, .dot.st-hatching, .dot.st-larva, .dot.st-ready { background: var(--st); }
.stage-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--st, var(--s-empty)); }
.stage-pill.st-ready { color: #fff; }

.egg-body { overflow: auto; padding: 14px; background: var(--bg); flex: 1; }
.egg-cols { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .egg-cols { grid-template-columns: 230px minmax(0, 1fr); } .egg-side { position: sticky; top: 0; } }
.egg-inc { margin: 0 auto; max-width: 260px; }
.egg-inc .tray { cursor: pointer; }
.egg-legend { margin-top: 10px; justify-content: center; }
.egg-main { max-width: 1000px; min-width: 0; }
.egg-main .panel:first-child { margin-top: 0; }
.eb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eb-head h3 { margin: 0; }
.eb-dd { margin-left: auto; font-size: 15px; }
.eb-dd b { font-size: 22px; }
.eb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.eb-grid > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.eb-grid span { font-size: 12px; color: var(--muted); }
.eb-grid b { font-size: 18px; }
.eb-grid b.eb-text { font-size: 14px; }
.eb-grid small { font-size: 12px; color: var(--muted); }
.eb-actions { margin-top: 10px; }
/* გრადუს-დღის ზოლი: შევსება — ახლანდელი °დ; ნიშნები — თვალიანი, გამოჩეკა, პირველი კვება (~ — სავარაუდო დღე) */
.dd-bar { position: relative; height: 12px; margin: 14px 0 52px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.dd-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--st); }
.dd-mark { position: absolute; top: -4px; bottom: -4px; width: 0; }
.dd-mark i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--text); opacity: .55; }
.dd-mlabel { position: absolute; top: 20px; left: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; line-height: 1.3; }
.dd-mlabel b { color: var(--text); }
.dd-mark:last-child .dd-mlabel { transform: translateX(-85%); }
table.data.compact th, table.data.compact td { padding: 6px 8px; }
.egg-tray-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.egg-tray-inputs label.taken { opacity: .6; }
.egg-tray-inputs small { font-size: 11px; }
.egg-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 10px; }
.egg-pick .check { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--text); }
.egg-pick input { width: 18px; height: 18px; }
.egg-th h3 small { font-weight: 400; }
/* დღის აღრიცხვა: საჩეკი */
.egg-daily h3 { margin-top: 0; }
.egg-daily-temp { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.egg-daily-temp label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.egg-daily input { font: inherit; font-size: 16px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; width: 110px; background: #fff; color: var(--text); }
.egg-daily input:disabled { background: var(--surface-2); color: var(--muted); }
.egg-daily-t td { vertical-align: middle; }
/* ქვირითის მომწოდებლები (პარამეტრები) — „+ ახალი მომწოდებელი“ ბარათი */
.sup-card.sup-add-btn { border-style: dashed; color: var(--brand); font-weight: 600; justify-content: center; }
.roe-ico { vertical-align: -0.15em; }
.pt-icon .roe-ico { width: 30px; height: 30px; }
/* „გადაყვანა / ჩასმა“ ↔ „ქვირითის ჩასმა“ — სათაურის ნაცვლად ორი ღილაკი */
.tr-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.tr-switch .tab { flex: 0 1 auto; font-size: 18px; padding: 10px 20px; }
.egg-page { max-width: 1400px; }
.egg-list-title { margin: 16px 0 0; font-size: 16px; }
/* საჩეკის ფანჯარა: არჩეული თარო; ამ თაროს ფაქტი და მიმდინარე (დაუხურავი დღე — ყვითლად, როგორც გეგმა) */
.egg-inc .tray.sel { transform: translateX(10px); border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.egg-sub { margin: 14px 0 8px; font-size: 14px; }
.eb-grid > div.dead b { color: var(--s-red); }
.eb-grid > div.plan { background: var(--plan-bg); }
.egg-log tr.plan td { background: var(--plan-bg); }
.egg-log { max-height: 380px; overflow: auto; }
/* მომხმარებლის რედაქტირება ცხრილის შიგნით (მფლობელი, 02.11.2026: „გავიდა ფანჯრიდან“): სტრიქონი პირველ სვეტს
   არ „ეკვრება“, ტექსტი იკეცება, სახელი და შესასვლელი სახელი — ბადეში, საიტის ბარათები — ცხრილის სიგანეში */
table.users tr.edit-row td { position: static; white-space: normal; text-align: left; }
table.users tr.edit-row .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-width: 760px; }
table.users tr.edit-row .grid > label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
table.users tr.edit-row .site-cards { max-width: 980px; }
table.users tr.edit-row .row { margin-top: 10px; }
/* მომხმარებლების გვერდი განიერია (საიტის სვეტები) — დიდ ეკრანზე ცხრილი გვერდზე აღარ გადაიწევა */
.page:has(#users-panel) { max-width: 1400px; }
/* საიტის ბარათი: მონიშვნა და „პირველი“ — ჩვეულებრივი ზომის, წარწერა ერთ ხაზზე (ველების 100% სიგანე მათ არ ეხება) */
.site-card .sc-row input[type=checkbox], .site-card .sc-row input[type=radio] { width: 18px; height: 18px; min-width: 0; flex: none; margin: 0; }
.site-card .sc-row { justify-content: flex-start; white-space: normal; }
.site-card .sc-tag { white-space: nowrap; margin-left: 2px; }

/* შენახვის რეაქცია (common.js — ყველგან, მფლობელი 02.11.2026): ღილაკი — ტრიალი / ✓ / წითელი კანკალი; ზემოთ შეტყობინება */
.is-busy { pointer-events: none; opacity: .8; }
.is-busy::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gf-spin .7s linear infinite; }
@keyframes gf-spin { to { transform: rotate(360deg); } }
.is-done { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-green) 55%, transparent) !important; }
.is-done::after { content: " ✓"; font-weight: 700; }
.is-failed { animation: gf-shake .35s; box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-red) 55%, transparent) !important; }
@keyframes gf-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 10000; display: grid; gap: 8px;
  justify-items: center; pointer-events: none; }
.toast { padding: 10px 20px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.err { background: var(--s-red); }
/* მკვდარი — ორი ვიწრო სვეტი (დილით / საღამოს): ზემოთ ცალი, ქვემოთ კგ (მფლობელი, 02.11.2026) */
.feed-table th.fm-h { text-align: center; white-space: normal; line-height: 1.25; }
.feed-table td.fm { white-space: nowrap; text-align: center; padding: 3px 6px; }
.feed-table td.fm input { width: 58px; }
/* სალიფსიტე: ნაშთის გადათვლა დღის აღრიცხვაში (ვადის დღეს) */
.stock-count h3 { margin-top: 0; }
.stock-count .table-wrap { max-width: 560px; }
.stock-count td { vertical-align: middle; }
.stock-count input { font: inherit; font-size: 16px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; width: 120px; background: #fff; color: var(--text); }
.stock-count input:disabled { background: var(--surface-2); color: var(--muted); }
/* სალიფსიტე: ვაქცინაცია — თითო აუზის გეგმა და გატარება */
.vac-pools td { vertical-align: top; }
.vp-plan, .vp-post { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin-top: 6px; }
.vp-plan label, .vp-post label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.vp-plan input, .vp-plan select, .vp-post input { font: inherit; font-size: 15px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; width: 120px; background: #fff; color: var(--text); }
.vp-plan input[name="date"] { width: 130px; }
.vp-more { display: contents; }
.vp-more[hidden] { display: none; }
/* ვაქცინაციის გეგმა (მფლობელი, 02.11.2026): ფართო გვერდი, ცხრილი სქროლის გარეშე, უფრო დიდი ველები, ერთ ხაზზე */
#page-treatments { max-width: 1600px; }
.order .table-wrap:has(> table.vac-pools) { max-height: none; }
.vp-plan label, .vp-post label { font-size: 13px; line-height: 1.25; }
.vp-plan input, .vp-plan select, .vp-post input { font-size: 16px; padding: 7px 9px; width: 110px; }
.vp-plan input[name="date"] { width: 135px; }
.vp-plan input[name^="fast"] { width: 90px; }
.vp-dest { display: inline-flex; gap: 8px; align-items: end; padding: 4px 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.vac-pools td { font-size: 15px; }
/* ფერმაში მიწოდება — „ელოდება ფარმინგის მიღებას“ */
.status.wait { background: #fbf0cc; color: #6b5100; }
/* წყლის ტემპერატურა → საჩეკის სენსორი (OxyGuard) */
#sensor-sec h2 { margin-top: 0; }
.sensor-now { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 10px; }
.sensor-now p { margin: 4px 0; }
table.sensor-list tr.sel td { background: color-mix(in srgb, var(--brand) 12%, transparent); font-weight: 600; }
/* საჩეკის ფანჯარა: ტემპერატურა დღეების მიხედვით — დღევანდელი (ჯერჯერობით) */
table.data tr.today td { background: var(--plan-bg); }
