/* Makti Kabalan – import projects. Plain CSS, right-to-left, no external files. */
:root {
  --navy: #1a365d; --navy-2: #24477a; --ink: #1d2433; --muted: #5f6b7e; --line: #dfe3ea;
  --bg: #f4f6f9; --card: #ffffff; --accent: #c8642a; --accent-soft: #fbeee5;
  --ok: #2f7d4f; --ok-soft: #e3f3e9; --risk: #a96a08; --risk-soft: #fdf3dc;
  --late: #c0392b; --late-soft: #fbe5e2; --block: #6b2c91; --block-soft: #f1e6f7;
  --done: #7a8699; --done-soft: #eef1f5; --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--ink); direction: rtl;
  font-family: "Segoe UI", "Assistant", Arial, sans-serif; line-height: 1.5; }
a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 22px 0 10px; }
h3 { font-size: 1.02rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* top bar */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 18px;
  padding: 0 20px; height: 56px; position: sticky; top: 0; z-index: 20; }
.topbar .brand { font-weight: 700; font-size: 1.05rem; color: #fff; white-space: nowrap; }
.topbar .brand span { color: #f6c7a6; font-weight: 600; }
.topbar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.topbar nav a { color: #dbe4f3; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.topbar nav a.on, .topbar nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; color: #fff; font-size: 1.15rem; padding: 6px 8px; }
.bell b { position: absolute; top: -2px; left: -4px; background: var(--accent); color: #fff;
  font-size: .7rem; border-radius: 10px; padding: 1px 6px; }
.usermenu { position: relative; }
.usermenu > button { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 8px;
  padding: 7px 12px; cursor: pointer; font: inherit; }
.usermenu .menu { display: none; position: absolute; left: 0; top: 40px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; min-width: 190px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.usermenu.open .menu { display: block; }
.usermenu .menu a, .usermenu .menu button { display: block; width: 100%; text-align: right; padding: 9px 14px;
  color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--bg); text-decoration: none; }

main { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px; }

/* flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: #b9e0c7; color: #1e5a37; }
.flash.error { background: var(--late-soft); border-color: #f2bdb6; color: #8a2419; }
.flash.warn { background: var(--risk-soft); border-color: #f0d48f; color: #7a4b04; }

/* cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi.late { color: var(--late); } .kpi.risk { color: var(--risk); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; font-size: 1.05rem; font-weight: 700; }
.section-title .count { background: var(--done-soft); color: var(--muted); border-radius: 12px; padding: 0 9px; font-size: .85rem; }
.section-title.late { color: var(--late); } .section-title.risk { color: var(--risk); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); border-radius: 8px; padding: 7px 13px; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.danger { color: var(--late); border-color: #f0c2bc; }
.btn.sm { padding: 3px 9px; font-size: .85rem; }
.btn.link { border: 0; background: none; color: var(--navy-2); padding: 0; }
input, select, textarea { font: inherit; border: 1px solid #c9d0db; border-radius: 8px; padding: 7px 10px;
  background: #fff; color: var(--ink); max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9bb4d8; border-color: #9bb4d8; }
textarea { width: 100%; min-height: 70px; }
label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 3px; }
.field { margin-bottom: 12px; }
.field input:not([type=checkbox]), .field select, .field textarea { width: 100%; }
.inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline label { margin: 0; }
form.inline { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .95rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; margin-bottom: 14px; }
.filters input[type=search] { min-width: 230px; }

/* badges */
.badge { display: inline-block; border-radius: 12px; padding: 1px 9px; font-size: .8rem; font-weight: 600;
  background: var(--done-soft); color: var(--muted); white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-risk { background: var(--risk-soft); color: var(--risk); }
.b-overdue, .b-late { background: var(--late-soft); color: var(--late); }
.b-blocked { background: var(--block-soft); color: var(--block); }
.b-done { background: var(--done-soft); color: var(--done); }
.b-navy { background: #e4ebf6; color: var(--navy); }
.b-accent { background: var(--accent-soft); color: var(--accent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--done); }
.dot.ok { background: var(--ok); } .dot.risk { background: #e0a526; } .dot.overdue { background: var(--late); }
.dot.blocked { background: var(--block); }

/* tables */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f3f8; font-size: .84rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:hover td { background: #fafbfd; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tablewrap table { border: 0; }

/* my tasks */
.task { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: #fff;
  border: 1px solid var(--line); border-right: 5px solid var(--done); border-radius: var(--radius);
  padding: 11px 14px; margin-bottom: 8px; }
.task.overdue { border-right-color: var(--late); } .task.risk { border-right-color: #e0a526; }
.task.ok { border-right-color: var(--ok); } .task.blocked { border-right-color: var(--block); }
.task .title { font-weight: 600; }
.task .meta { color: var(--muted); font-size: .86rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.task .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.approval { background: #fff; border: 1px solid #f0d2bd; border-right: 5px solid var(--accent);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 8px; }

/* kanban */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; }
.col { background: #e9edf3; border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col h3 { display: flex; justify-content: space-between; font-size: .95rem; color: var(--navy); margin: 2px 4px 10px; }
.pcard { display: block; background: #fff; border-radius: 9px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-right: 5px solid var(--ok); color: var(--ink); }
.pcard:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(26,54,93,.12); }
.pcard.risk { border-right-color: #e0a526; } .pcard.overdue { border-right-color: var(--late); }
.pcard.blocked { border-right-color: var(--block); }
.pcard .num { font-size: .78rem; color: var(--muted); }
.pcard .name { font-weight: 650; margin: 2px 0 4px; }
.pcard .pstage { font-size: .85rem; }
.pcard .foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.progress { height: 5px; background: #e4e8ef; border-radius: 4px; overflow: hidden; margin-top: 6px; display: flex; }
.progress span { display: block; height: 100%; background: var(--navy-2); }

/* project page */
.phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 8px; color: var(--muted); font-size: .92rem; }
.facts b { color: var(--ink); font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 18px 0 14px; overflow-x: auto; }
.tabs a { padding: 9px 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--navy); }

.timeline { position: relative; margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px 8px; margin-bottom: 14px; }
.tl-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 10px; height: 24px; }
.tl-row .lbl { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 12px; }
.tl-bar { position: absolute; height: 12px; border-radius: 6px; background: #c7d3e6; min-width: 4px; }
.tl-bar.done { background: #b6c0cf; } .tl-bar.ok { background: #7fa6d6; } .tl-bar.risk { background: #e8b74d; }
.tl-bar.overdue { background: #df7366; } .tl-bar.blocked { background: #a87cc6; }
.tl-base { position: absolute; height: 2px; top: 5px; background: #8a94a6; opacity: .5; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--accent); }
.tl-scale { display: grid; grid-template-columns: 190px 1fr; gap: 10px; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.tl-scale div:last-child { display: flex; justify-content: space-between; }

.stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; scroll-margin-top: 70px; }
.stage > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px 1fr auto;
  gap: 10px; align-items: center; padding: 11px 14px; }
.stage > summary::-webkit-details-marker { display: none; }
.stage .seq { width: 30px; height: 30px; border-radius: 50%; background: #e4ebf6; color: var(--navy);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.stage.s-done .seq { background: var(--ok-soft); color: var(--ok); }
.stage.s-overdue .seq { background: var(--late-soft); color: var(--late); }
.stage.s-na { opacity: .6; }
.stage .sname { font-weight: 650; }
.stage .smeta { font-size: .85rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.stage .sbody { border-top: 1px solid var(--line); padding: 14px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.stage .box { background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.stage .box h4 { margin: 0 0 8px; font-size: .9rem; color: var(--navy); }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.tasks li.done span { color: var(--muted); text-decoration: line-through; }
.tasks button.tick { width: 20px; height: 20px; border: 2px solid #9aa6b8; border-radius: 5px; background: #fff;
  cursor: pointer; padding: 0; line-height: 1; color: #fff; font-size: 13px; }
.tasks li.done button.tick { background: var(--ok); border-color: var(--ok); }
.req { color: var(--late); font-size: .8rem; }
.lockmsg { background: var(--risk-soft); color: #7a4b04; border-radius: 8px; padding: 8px 10px; font-size: .88rem; margin-bottom: 10px; }
.missing { font-size: .85rem; color: var(--late); margin: 4px 0 0; padding-right: 18px; }
.changes { font-size: .82rem; color: var(--muted); max-height: 130px; overflow-y: auto; margin: 0; padding-right: 16px; }

.comment { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.comment .who { font-weight: 600; } .comment .when { color: var(--muted); font-size: .82rem; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; }
.log td { font-size: .88rem; }

/* notifications */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; color: var(--ink); }
.notif.unread { border-right: 4px solid var(--accent); background: #fffaf6; }
.notif:hover { text-decoration: none; background: #f8f9fb; }

/* product photos */
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; vertical-align: middle; }
.thumb.lg { width: 72px; height: 72px; }
.prodstrip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.prodchip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 10px 4px 4px; font-size: .88rem; color: var(--ink); }
.prodchip .ph { width: 44px; height: 44px; border-radius: 6px; background: #eef1f5; display: grid; place-items: center; color: var(--muted); font-size: .7rem; }
.pcard .pimg { float: left; width: 46px; height: 46px; object-fit: cover; border-radius: 6px; margin-right: 8px; border: 1px solid var(--line); }

/* login */
.login { max-width: 380px; margin: 9vh auto; }
.login .card { padding: 26px; }
.login h1 { color: var(--navy); }

.empty { color: var(--muted); background: #fff; border: 1px dashed #cdd4df; border-radius: var(--radius);
  padding: 18px; text-align: center; }
.funnel-bar { height: 26px; background: var(--navy-2); border-radius: 4px; color: #fff; font-size: .85rem;
  display: flex; align-items: center; padding: 0 8px; white-space: nowrap; min-width: 34px; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-width: 460px; width: 92vw; }
dialog::backdrop { background: rgba(20,30,50,.35); }
.hide { display: none !important; }

@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage .sbody { grid-template-columns: 1fr; }
  .tl-row, .tl-scale { grid-template-columns: 110px 1fr; }
  .board { grid-template-columns: repeat(4, 260px); }
}
@media (max-width: 600px) {
  html { font-size: 14px; }
  main { padding: 14px 12px 50px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .topbar { padding: 0 10px; gap: 8px; }
  .topbar .brand { display: none; }
  .task { grid-template-columns: 1fr; }
  .task .actions { justify-content: flex-start; }
  .stage > summary { grid-template-columns: 30px 1fr; }
  .stage > summary > :last-child { grid-column: 2; }
}
@media print {
  .topbar, .tabs, .btn, form { display: none !important; }
  body { background: #fff; }
}

/* searchable select (select[data-search]) */
.combo { position: relative; }
.combo-native { display: none !important; }
.field .combo .combo-input, .combo .combo-input { width: 100%; }
.combo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.combo.multi .combo-chips:not(:empty) { margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #e8eef7; color: var(--navy);
  border-radius: 999px; padding: 2px 6px 2px 10px; font-size: .88rem; }
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem;
  line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip button:hover { background: #d3dceb; color: var(--ink); }
.combo-list { display: none; position: absolute; inset-inline: 0; top: 100%; margin-top: 2px; z-index: 30;
  background: #fff; border: 1px solid #c9d0db; border-radius: 8px; box-shadow: 0 6px 18px rgba(20,30,50,.12);
  max-height: 280px; overflow-y: auto; }
.combo.open .combo-list { display: block; }
.combo-opt { padding: 7px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.combo-opt.act, .combo-opt[data-i]:hover { background: #eef3fa; }
.combo-opt.sel { font-weight: 600; }
.combo-opt.muted { cursor: default; }
.combo-tag { font-size: .75rem; color: var(--accent); background: var(--accent-soft); border-radius: 999px;
  padding: 0 8px; white-space: nowrap; align-self: center; }

/* data panel of receiving / Hashavshevet stages */
.stage .spanel { border-top: 1px solid var(--line); padding: 12px 14px 4px; background: #fbfcfe; }
.stage .spanel h4 { margin: 0 0 8px; font-size: .95rem; color: var(--navy); }
.ptable { font-size: .9rem; margin-bottom: 8px; }
.ptable td, .ptable th { vertical-align: middle; }
.ptable input.qty { width: 80px; }
.ptable td.late { color: var(--late); font-weight: 600; }
.hashbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* "what was decided" note on a task */
.tasks li { flex-wrap: wrap; }
.tasks .tnote { flex-basis: 100%; margin: 2px 34px 4px 0; padding: 5px 10px; background: #fff;
  border: 1px solid var(--line); border-inline-start: 3px solid var(--navy-2); border-radius: 6px;
  font-size: .9rem; color: var(--ink); white-space: pre-wrap; text-decoration: none; }
.tasks .tnote[data-note-open] { cursor: pointer; }
.tasks .tnote[data-note-open]:hover { background: #f1f5fb; }
.tasks .tnote-add { border: 0; background: transparent; color: var(--navy-2); font-size: .8rem;
  cursor: pointer; padding: 0 4px; opacity: .75; }
.tasks .tnote-add:hover { opacity: 1; text-decoration: underline; }
.tasks .tnote-form { flex-basis: 100%; margin: 4px 34px 6px 0; }
.tasks .tnote-form textarea { width: 100%; margin-bottom: 4px; }

/* suppliers: segmented radio, filter chips, bulk bar */
.seg { display: inline-flex; border: 1px solid #c9d0db; border-radius: 8px; overflow: hidden; }
.seg label { margin: 0; cursor: pointer; position: relative; }
.seg input, .field .seg input { position: absolute; inset: 0; width: 1px !important; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 14px; background: #fff; }
.seg label + label span { border-inline-start: 1px solid #c9d0db; }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid #9bb4d8; }
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.filters-row .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.chip-f { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; font-size: .88rem; color: var(--ink); }
.chip-f b { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.chip-f.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-f.on b { color: #cfd9ea; }
.chip-f:hover { text-decoration: none; border-color: var(--navy-2); }
.bulkbar { margin-bottom: 8px; }

/* ---------------------------------------------------------------- free tasks */
.quickadd input { width: 230px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff; padding: 6px 10px; border-radius: 8px; }
.quickadd input::placeholder { color: #c9d5ea; }
.quickadd input:focus { background: #fff; color: var(--ink); outline: none; width: 320px; }
.quickadd-m { display: none; color: #fff; font-size: 1.5rem; line-height: 1; padding: 2px 10px; border-radius: 8px;
  background: var(--accent); }
.quickadd-m:hover { text-decoration: none; }
.bigadd { display: flex; gap: 8px; padding: 10px; margin-bottom: 16px; }
.bigadd input { flex: 1; font-size: 1.05rem; padding: 10px 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 6px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; color: var(--muted); border-top: 3px solid var(--line); }
.tile:hover { text-decoration: none; border-color: var(--navy-2); }
.tile .kpi { color: var(--navy); }
.tile.late { border-top-color: var(--late); } .tile.late .kpi { color: var(--late); }
.tile.accent { border-top-color: var(--accent); } .tile.accent .kpi { color: var(--accent); }
.tiles.flat .tile { border-top-width: 1px; }
.kpi.ok { color: var(--ok); }
.breakdown h3 { margin-bottom: 8px; }
.breakdown table { width: 100%; font-size: .92rem; }
.breakdown td, .breakdown th { padding: 5px 6px; }
.breakdown td + td, .breakdown th + th { text-align: center; width: 70px; }
.breakdown a.late { color: var(--late); font-weight: 700; }
.task.todo .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task.todo .tick { width: 20px; height: 20px; border: 2px solid #9aa6b8; border-radius: 50%; background: #fff;
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; }
.task.todo .tick:hover { border-color: var(--ok); background: var(--ok-soft); }
.task.todo .tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.task.todo.closed .title a { color: var(--muted); }
.task.todo.done { border-right-color: var(--done); }
.task .nextstep { font-size: .88rem; color: var(--navy-2); margin-top: 3px; }
.task .meta .late { color: var(--late); font-weight: 600; }
.dchip { background: #eef2f8; color: var(--navy); border-radius: 999px; padding: 0 8px; }
.st-inbox { background: var(--accent-soft); color: var(--accent); }
.st-todo { background: #eef1f5; color: var(--muted); }
.st-in_progress { background: #e4ebf6; color: var(--navy); }
.st-waiting { background: var(--risk-soft); color: var(--risk); }
.st-done { background: var(--ok-soft); color: var(--ok); }
.st-cancelled { background: var(--done-soft); color: var(--done); text-decoration: line-through; }
.statusbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.spill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; font: inherit;
  font-size: .9rem; opacity: .75; }
.spill:hover { opacity: 1; }
.spill.on { opacity: 1; outline: 2px solid currentColor; font-weight: 700; cursor: default; }
.phone { max-width: 520px; margin: 0 auto; }
.phone textarea { width: 100%; font-size: 1.15rem; padding: 12px; margin-bottom: 10px; }
.btn.big { width: 100%; justify-content: center; padding: 12px; font-size: 1.1rem; }
.phone-links { display: flex; gap: 8px; margin-top: 12px; }
.phone-links .btn { flex: 1; justify-content: center; }
.phone-recent { list-style: none; padding: 0; margin: 0; }
.phone-recent li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
@media (max-width: 900px) {
  .quickadd { display: none; }
  .quickadd-m { display: inline-block; }
}
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bigadd { flex-direction: column; }
  .task.todo .actions { display: none; }
}
.pgoal { background: #fff; border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: 8px; padding: 8px 12px; margin-top: 10px; display: grid; gap: 3px; }
.pcard .foot b.late { color: var(--late); }
.filterbox > summary { list-style: none; margin-bottom: 10px; cursor: pointer; }
.filterbox > summary::-webkit-details-marker { display: none; }
@media (min-width: 701px) { .filterbox > summary { display: none; } }
@media (max-width: 600px) { .topbar nav a { padding: 8px 8px; } }

/* project groups: one closed line per project, its stages open on click */
.pgroup { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.pgroup > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px; }
.pgroup > summary::-webkit-details-marker { display: none; }
.pgroup > summary::before { content: "◂"; color: var(--muted); transition: transform .15s; }
.pgroup[open] > summary::before { transform: rotate(-90deg); }
.pgroup > summary:hover { background: #f8f9fb; }
.pgroup .pg-name { font-weight: 650; color: var(--navy); }
.pgroup .pg-body { padding: 0 10px 4px; }
.pgroup .pg-body .task { margin-bottom: 8px; }
.pg-stages { list-style: none; margin: 0; padding: 0 14px 10px; }
.pg-stages li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }

/* eye button on password fields */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-inline-end: 40px; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); border: 0;
  background: transparent; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px;
  display: inline-flex; align-items: center; }
.pw-eye:hover { color: var(--navy); background: #eef2f8; }
.pw-eye[aria-pressed="true"] { color: var(--navy); }
.logincard { margin-bottom: 14px; border-inline-start: 3px solid var(--accent); }
.logincard pre { background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-family: inherit; white-space: pre-wrap; direction: rtl; unicode-bidi: plaintext; margin: 8px 0; }

/* ---------------------------------------------------------------- legal */
.lcase { display: flex; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-inline-start: 4px solid var(--navy-2); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  color: var(--ink); }
.lcase:hover { text-decoration: none; border-color: var(--navy-2); }
.lcase.late { border-inline-start-color: var(--late); }
.lcase.closed { border-inline-start-color: var(--done); opacity: .8; }
.lc-title { font-weight: 650; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lcase .meta { color: var(--muted); font-size: .86rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; }
.lc-note { font-size: .88rem; color: var(--ink); margin-top: 4px; }
.lc-date { display: flex; flex-direction: column; align-items: flex-end; text-align: end; gap: 2px; white-space: nowrap; }
.lc-date .late, .lc-status .late { color: var(--late); }
.lc-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.lc-status > div { display: flex; flex-direction: column; gap: 2px; }
.lc-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.ltimeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.ltimeline li { padding: 6px 12px; position: relative; }
.ltimeline li::before { content: ""; position: absolute; inset-inline-start: -6px; top: 12px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--navy-2); }
.ltimeline li.lt-change::before, .ltimeline li.lt-file::before { background: #c9d0db; }
.ltimeline li.lt-change > div:last-child, .ltimeline li.lt-file > div:last-child { color: var(--muted); font-size: .9rem; }
.ls-open { background: #e4ebf6; color: var(--navy); }
.ls-lawyer { background: var(--block-soft); color: var(--block); }
.ls-negotiation { background: var(--accent-soft); color: var(--accent); }
.ls-court { background: var(--late-soft); color: var(--late); }
.ls-waiting { background: var(--risk-soft); color: var(--risk); }
.ls-closed { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 900px) { .lc-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .lcase { flex-direction: column; } .lc-date { align-items: flex-start; text-align: start; } }
.nowrap-inline { flex-wrap: nowrap; width: 100%; }
.field .nowrap-inline select { width: auto; }
.seriesnote { background: #eef3fa; border: 1px solid #d3dceb; border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; font-size: .92rem; }
.card.steps .tasks li { padding: 5px 0; }
.card.steps textarea { min-height: 38px; }
.task.todo.prio-high { box-shadow: inset 3px 0 0 var(--late); }
.task.todo.prio-low { opacity: .72; }
.task.todo.prio-low:hover { opacity: 1; }

/* arrivals board */
.arow { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--navy-2);
  border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.arow.st-port, .arow.st-released { border-inline-start-color: var(--accent); }
.arow.st-received { border-inline-start-color: var(--ok); }
.arow.st-planned { border-inline-start-color: var(--done); }
.ar-date { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; text-align: center; font-size: .78rem; color: var(--muted); }
.ar-date b { font-size: 1.35rem; color: var(--navy); line-height: 1.2; }
.ar-main { flex: 1; min-width: 0; }
.ar-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 600; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); margin-top: 2px; }
.ar-lines summary { cursor: pointer; color: var(--navy-2); margin-top: 4px; }
.ar-lines table { margin-top: 6px; }
.ar-lines tr.late td { color: var(--late); }
.ar-week h3 { margin: 14px 0 8px; font-size: 1.02rem; }
.ar-week h3 .muted { font-weight: 400; margin-inline-start: 6px; }
.badge.ar-s-planned { background: var(--done-soft); color: var(--done); }
.badge.ar-s-sea { background: #e8eef7; color: var(--navy-2); }
.badge.ar-s-port, .badge.ar-s-released { background: var(--accent-soft); color: var(--accent); }
.badge.ar-s-received { background: var(--ok-soft); color: var(--ok); }
.badge.ar-cold { background: #e0f2fb; color: #0f6a93; }
.sto { border-radius: 6px; padding: 0 6px; background: var(--done-soft); color: var(--ink); }
.sto-chilled { background: #e0f2fb; color: #0f6a93; } .sto-frozen { background: #dde6fb; color: #2c4fa3; }
.accent-t { color: var(--accent); }
@media (max-width: 600px) { .arow { padding: 8px; gap: 8px; } .ar-date { flex-basis: 54px; } }
@media print { .filters-row, .tiles { display: none; } .arow { break-inside: avoid; } .ar-lines { display: block; } }
.ar-main .late { color: var(--late); }

/* manufacturer / dealer badge next to supplier names */
.stype { display: inline-block; border-radius: 6px; padding: 0 6px; font-size: .74rem; font-weight: 600;
  line-height: 1.5; vertical-align: 1px; white-space: nowrap; }
.stype-supplier { background: #e7f2ec; color: #2f7d4f; }
.stype-dealer { background: #f3e9f8; color: #6b2c91; }

/* agriculture */
.afarmer { display: flex; gap: 14px; justify-content: space-between; color: var(--ink); margin-bottom: 8px; padding: 12px 14px; }
.afarmer:hover { text-decoration: none; border-color: var(--navy-2); }
.af-main { min-width: 0; flex: 1; }
.af-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.af-nums { display: flex; gap: 14px; align-items: center; }
.af-nums div { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.af-nums b { font-size: 1.15rem; color: var(--navy); }
.af-nums span { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.badge.agap-b { background: var(--risk-soft); color: var(--risk); }
.badge.b-ok { background: var(--ok-soft); color: var(--ok); }
.agaps { border-inline-start: 4px solid var(--risk); margin: 12px 0; }
.agaps ul { margin: 6px 0 8px; padding-inline-start: 18px; }
.agap { padding: 8px 12px; margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.acrop { display: block; color: var(--ink); margin-bottom: 8px; padding: 10px 14px; border-inline-start: 4px solid var(--ok); }
.acrop:hover { text-decoration: none; border-color: var(--navy-2); }
.acrop.ended { opacity: .6; border-inline-start-color: var(--done); }
.ac-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); margin-top: 3px; }
.badge.cs-planning { background: var(--done-soft); color: var(--done); }
.badge.cs-planted, .badge.cs-growing { background: #e8eef7; color: var(--navy-2); }
.badge.cs-harvest { background: var(--ok-soft); color: var(--ok); }
.aplot { display: flex; margin-bottom: 6px; }
.agrid-wrap { max-width: 100%; overflow-x: auto; }
.agrid { font-size: .8rem; border-collapse: separate; border-spacing: 2px; background: transparent; }
.agrid th, .agrid td { padding: 3px 5px; text-align: center; white-space: nowrap; }
.agrid thead th { color: var(--muted); font-weight: 600; background: transparent; }
.agrid thead th.now { color: var(--accent); }
.agrid th.sticky { position: sticky; right: 0; background: var(--bg); text-align: start; z-index: 1; min-width: 110px; }
.agrid td { background: #fff; border-radius: 5px; min-width: 52px; line-height: 1.25; }
.agrid td b { font-weight: 700; } .agrid td span { color: var(--muted); }
.agrid td i, .agrid td em { display: block; font-style: normal; font-size: .68rem; color: var(--muted); }
.agrid td i.one { color: var(--risk); } .agrid td em { color: var(--ok); }
.ac-short { background: var(--late-soft) !important; } .ac-short b { color: var(--late); }
.ac-ok { background: var(--ok-soft) !important; }
.ac-surplus { background: var(--risk-soft) !important; }
.ac-supply { background: #eef2f8 !important; }
.ac-none { background: #fafbfc !important; }
.alegend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.alegend span { padding: 0 8px; border-radius: 5px; }
.aalerts { margin-bottom: 12px; } .aalerts h3 { margin: 0 0 6px; font-size: .95rem; }
.arow-mini { margin-bottom: 4px; } .arow-mini > span:first-child { display: inline-block; min-width: 82px; color: var(--muted); }
.arow-mini > span.late { color: var(--late); }
.agroup { margin-bottom: 12px; }
.ag-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.ag-head h3 { margin: 0; }
.tl-months { display: flex; margin-inline-start: 220px; border-bottom: 1px solid var(--line); }
.tl-months span { flex: 1; font-size: .72rem; color: var(--muted); text-align: center; }
.ag-row { display: flex; align-items: center; border-bottom: 1px dashed #eef1f5; min-height: 40px; }
.ag-who { flex: 0 0 220px; display: flex; flex-direction: column; color: var(--ink); padding: 3px 0; line-height: 1.3; }
.ag-track { flex: 1; position: relative; height: 22px; }
.ag-bar { position: absolute; top: 4px; height: 14px; border-radius: 7px; background: var(--ok); }
.ag-bar.cs-planning { background: #b9c3d3; } .ag-bar.cs-ended { background: var(--done); }
.ag-track .tl-today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--accent); }
.weeknav { display: flex; gap: 10px; align-items: center; justify-content: center; margin-bottom: 12px; }
.areceive { margin-bottom: 10px; } .areceive h3 { margin: 0 0 6px; }
.ar-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eef1f5; margin: 0; }
.ar-line input { width: 110px; font-size: 1.05rem; text-align: center; }
.dev-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dev-col { background: #eaeef4; border-radius: var(--radius); padding: 8px; min-height: 120px; }
.dev-col h3 { margin: 2px 4px 8px; font-size: .92rem; }
.dev-item { display: block; color: var(--ink); padding: 8px 10px; margin-bottom: 6px; }
.dev-item:hover { text-decoration: none; border-color: var(--navy-2); }
@media (max-width: 900px) { .dev-board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .afarmer { flex-direction: column; } .af-nums { justify-content: space-between; }
  .tl-months { margin-inline-start: 0; } .ag-row { flex-direction: column; align-items: stretch; padding: 4px 0; }
  .ag-who { flex-basis: auto; } .dev-board { grid-template-columns: 1fr; }
}
