@font-face { font-family: "Tajawal"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/tajawal-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/tajawal-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/tajawal-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/tajawal-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Dancing Script"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/dancing-script-600.woff2) format("woff2"); }
/* Platform design: navy background, company logo on top, light-weight cards with a thin white border */

:root {
  --bg-top: #0b1f3f;
  --bg-bottom: #10305f;
  --card: rgba(20, 30, 54, 0.6);
  --card-strong: rgba(20, 30, 54, 0.8);
  --card-border: rgba(255, 255, 255, 0.25);
  --input: rgba(20, 30, 54, 0.55);
  --input-border: rgba(255, 255, 255, 0.7);
  --text: #ffffff;
  --muted: #cbd5e1;
  --accent: #3fa9f5;
  --yellow: #ffd54f;
  --green: #a5d6a7;
  --danger: #ffb4b4;
  --icon-box: #e0f2fe;
  --icon-box-border: #bae6fd;
  --b-p1: #3d8fdc;
  --b-p2: #1a4f96;
  --b-g1: #43a047;
  --b-g2: #1b5e20;
  --b-d1: #e5605a;
  --b-d2: #b71c1c;
  --b-w1: #ffc94d;
  --b-w2: #c9821f;
  --b-bd: rgba(255,255,255,.28);
  --b-bd-top: rgba(255,255,255,.55);
  --b-neutral-bg: rgba(255,255,255,.07);
  --b-neutral-bd: rgba(255,255,255,.28);
  --b-neutral-ink: #e6eefb;
  --b-sel-bg: rgba(63,169,245,.20);
  --b-sel-bd: rgba(63,169,245,.75);
  --b-sel-ink: #fff;
  --b-tray-bg: rgba(255,255,255,.06);
  --b-tray-bd: rgba(255,255,255,.16);
  --b-chip-bd: rgba(255,255,255,.18);
  --b-hover-bg: rgba(63,169,245,.14);
  --b-ok: #7cfc98;
  --b-ok-bg: rgba(63,211,122,.18);
  --b-ok-bd: rgba(63,211,122,.45);
  --b-warn: #ffd54f;
  --b-warn-bg: rgba(255,213,79,.16);
  --b-warn-bd: rgba(255,213,79,.45);
  --b-warn-ink: #241a00;
  --b-bad: #ff8a80;
  --b-bad-bg: rgba(255,107,107,.18);
  --b-bad-bd: rgba(255,107,107,.45);
  --b-info: #8fd0ff;
  --b-info-bg: rgba(63,169,245,.20);
  --b-info-bd: rgba(63,169,245,.55);
  --b-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 0 rgba(0,0,0,.28), 0 6px 14px -8px rgba(0,0,0,.7);
  --b-focus: #8fd0ff;
  --b-r: 12px;
  --b-r-sm: 10px;
  --b-ic: 42px;
  --b-ic-sm: 34px;
  --b-chip-bg: rgba(255,255,255,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 60%, #0b2347 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.brand { text-align: center; margin-bottom: 20px; }
.brand img { width: 190px; max-width: 50vw; height: auto; }
.brand.small img { width: 130px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}
.topbar a, .link-btn {
  color: var(--b-info);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}
.link-btn.danger { color: var(--b-bad); }
#userBar { display: flex; align-items: center; gap: 14px; }

h1.title { text-align: center; font-size: 22px; margin: 6px 0 4px; }
p.subtitle { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.glass {
  background: var(--card);
  border: 1.2px solid var(--card-border);
  border-radius: 18px;
  backdrop-filter: blur(4px);
}

/* List cards */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.menu-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.menu-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.55); }
.menu-card .icon-box {
  width: 80px; height: 60px; flex: none;
  background: var(--icon-box);
  border: 1px solid var(--icon-box-border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.menu-card .icon-box img { max-width: 72px; max-height: 50px; }
.menu-card .icon-box img.svg { width: 44px; height: 44px; }
.menu-card .icon-box.full { overflow: hidden; }
.menu-card .icon-box.full img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.menu-card .text { flex: 1; min-width: 0; }
.menu-card .text b { display: block; font-size: 16px; }
.menu-card .text > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.menu-card .arrow { color: #fff; font-size: 14px; opacity: .8; }
.menu-card.disabled { opacity: .45; cursor: default; }
.menu-card.disabled:hover { transform: none; border-color: var(--card-border); }
.badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,213,79,.15); color: var(--yellow); margin-inline-start: 6px;
  font-weight: 700;
}

.section-title { font-size: 14px; color: var(--muted); margin: 22px 4px 10px; }

/* Login form */
.login-box { max-width: 420px; margin: 0 auto; padding: 22px; }
.field { display: block; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input);
  color: #fff;
  font: inherit;
  font-size: 15px;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
select option { background: #13284d; color: #fff; }
input[type=email], input[type=password] { direction: ltr; text-align: left; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 10px 18px;
  border: 1px solid var(--b-bd);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--b-p1), var(--b-p2));
  color: #fff;
  font: inherit;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  border-top-color: var(--b-bd-top);
  box-shadow: var(--b-shadow);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: filter .12s ease, transform .08s ease, box-shadow .12s ease;
}

.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(0,0,0,.25); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--b-neutral-bg); border: 1px solid var(--b-neutral-bd); color: var(--b-neutral-ink); box-shadow: none; text-shadow: none; }


.btn.secondary:hover:not(:disabled) { background: var(--b-hover-bg); border-color: var(--b-sel-bd); filter: none; }
.error { color: var(--danger); font-size: 13px; margin-top: 12px; text-align: center; min-height: 18px; }
.notice {
  max-width: 640px; margin: 0 auto 16px; padding: 14px 16px; font-size: 13px; line-height: 1.8;
  border-color: rgba(255,213,79,.6);
}
.notice code { direction: ltr; unicode-bidi: embed; background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 6px; }

/* Data lists */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 220px; }
.breadcrumb { color: var(--yellow); font-weight: bold; font-size: 14px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list.rep-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.list.rep-grid3 > .row { margin: 0; }
@media (max-width: 1100px) { .list.rep-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .list.rep-grid3 { grid-template-columns: 1fr; } }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-radius: 12px;
  background: var(--input);
  border: 1px solid rgba(255,255,255,.55);
  cursor: pointer;
}
.row:hover { border-color: #fff; }
.row .main { min-width: 0; }
.row .main b { display: block; font-size: 15px; }
.row .main > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.row .count {
  flex: none; min-width: 44px; text-align: center; padding: 4px 10px; border-radius: 12px;
  background: rgba(63,169,245,.18); color: #9ed3ff; font-weight: bold; font-size: 13px;
}
.empty, .loading { text-align: center; color: var(--muted); padding: 28px; }

/* Details dialog */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 10;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 680px; max-height: 88vh; overflow: auto;
  background: rgba(20,30,54,.97); border: 1.2px solid var(--card-border); border-radius: 18px;
  padding: 20px 22px;
}
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal h3 { margin: 18px 0 6px; font-size: 14px; color: var(--yellow); }
.modal ul { margin: 0; padding-inline-start: 18px; }
.modal li { margin: 4px 0; font-size: 14px; line-height: 1.7; }
.modal .none { color: #8b98ab; font-size: 13px; }
.modal .close { margin-top: 18px; }

@media (max-width: 600px) {
  .menu { grid-template-columns: 1fr; }
  .brand img { width: 150px; }
}

/* Summary screens (weekly / monthly) */
.panel { padding: 16px 18px; margin-bottom: 14px; }
.panel-title { margin: 0 0 10px; font-size: 15px; }
.controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.controls label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.controls .grow { flex: 1; min-width: 220px; }
.wk-ctl { align-items: center; }
.wk-ctl label { flex-direction: row; align-items: center; gap: 8px; white-space: nowrap; }
.wk-ctl select { width: auto; min-width: 170px; max-width: 280px; margin: 0; }
.wk-ctl .actions { display: flex; flex-direction: row; gap: 8px; }
.wk-ctl .actions .btn { width: auto; margin: 0; }
.fit-ctl select { width: auto; min-width: 160px; max-width: 260px; }
.fit-ctl input[type="search"] { width: 240px; max-width: 100%; }
.fit-ctl > .btn { margin: 0; width: auto; }
.fit-ctl > .actions { margin-inline-start: auto !important; }
.period { display: flex; align-items: center; gap: 10px; }
.period-label { font-weight: bold; color: var(--yellow); min-width: 170px; text-align: center; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn.small { width: auto; padding: 7px 14px; font-size: 13px; white-space: nowrap; border-radius: 10px; }
.btn.green { background: linear-gradient(180deg, var(--b-g1), var(--b-g2)); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { padding: 14px 16px; text-align: center; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { display: block; font-size: 28px; margin-top: 4px; }
.summary h3 { margin: 14px 0 6px; font-size: 14px; color: var(--yellow); }
.summary ul { margin: 0; padding-inline-start: 18px; columns: 250px auto; column-gap: 28px; }
.summary li { margin: 3px 0; font-size: 14px; break-inside: avoid; }
.summary .panel-title { margin-top: 0; }
.summary .none { color: #8b98ab; font-size: 13px; }

.chart svg { width: 100%; height: 240px; display: block; }
.chart .bar { fill: #3fa9f5; }
.chart .grid { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.chart .axis { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.chart .lbl, .chart .val { fill: #cbd5e1; font-size: 12px; text-anchor: middle; font-family: inherit; }
.chart .val { fill: #fff; font-weight: bold; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: rgba(255,255,255,.06); }
.chart-tip {
  position: fixed; display: none; z-index: 20; pointer-events: none;
  background: #0b1f3f; border: 1px solid rgba(255,255,255,.35); border-radius: 8px;
  padding: 6px 10px; font-size: 12px; color: #fff; text-align: center;
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { color: var(--muted); font-weight: bold; text-align: center; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.25); }
.table td { text-align: center; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.table th:first-child, .table td:first-child { text-align: right; }

.print-only { display: none; }

@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat b { font-size: 22px; }
  .period { width: 100%; flex-wrap: wrap; justify-content: space-between; }
  .period-label { min-width: 0; order: -1; width: 100%; }
}

/* Print / save as PDF: white background and dark text for a clear print */
@media print {
  html, body { background: #fff !important; color: #111 !important; }
  body::after, .no-print, .chart-tip, .modal-backdrop { display: none !important; }
  .print-only { display: block; text-align: center; margin-bottom: 12px; font-size: 15px; }
  .page { max-width: none; padding: 0; }
  .brand img { filter: invert(1) hue-rotate(180deg); }
  .glass, .row { background: #fff !important; border: 1px solid #bbb !important; backdrop-filter: none; color: #111; }
  .subtitle, .stat span, .section-title, .row .main > span, .table th { color: #444 !important; }
  .summary h3, .panel-title { color: #0b2d5b !important; }
  .chart .bar { fill: #1e5aa8; }
  .chart .lbl { fill: #333; } .chart .val { fill: #111; }
  .chart .grid { stroke: #ddd; } .chart .axis { stroke: #999; }
  .row { break-inside: avoid; }
}

/* Progress tracking + statistics */
.st-red { color: #ff6b6b; } .st-green { color: #7cfc98; } .st-yellow { color: #ffd54f; }
.row .main > span.st-green { color: #7cfc98; } .row .main > span.st-yellow { color: #ffd54f; }
.st-gray { color: #9aa5b5; } .st-orange { color: #ffb74d; } .st-blue { color: #81d4fa; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 12px; margin: 0 4px 10px; }
.prow { cursor: pointer; }
.prow .main > span { margin-top: 4px; }
.prow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.prow-head .pct { font-weight: bold; font-size: 16px; }
.pbar { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); margin: 8px 0 4px; overflow: visible; }
.pfill { position: absolute; right: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(270deg, #1e5aa8, #3fa9f5); }
.pmark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-right: -1.5px; background: #ffd54f; border-radius: 2px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats.four .stat span { min-height: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin: 5px 0; font-size: 14px; }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 200px) 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.hbar .ht { height: 12px; background: rgba(255,255,255,.10); border-radius: 6px; }
.hbar .hf { height: 100%; border-radius: 6px; background: #3fa9f5; }
.hbar b { text-align: left; }
@media (max-width: 600px) {
  .stats.four { grid-template-columns: 1fr 1fr; }
  .hbar { grid-template-columns: 90px 1fr 30px; }
}
@media print {
  .pbar { background: #eee; } .pmark { background: #e0a800; }
  .st-green { color: #1b7f3a !important; } .st-red { color: #c62828 !important; }
  .st-yellow { color: #a07800 !important; } .st-orange { color: #c66900 !important; } .st-blue { color: #0b5d8f !important; }
  .muted, .hint { color: #444 !important; }
  .hbar .ht { background: #eee; } .hbar .hf { background: #1e5aa8; }
}

/* Systems screens: input dialogs and buttons */
.dlg-body .field { margin-bottom: 12px; }
.dlg-body .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.dlg-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.dlg-actions .btn { flex: 1; }
.btn.danger { background: linear-gradient(180deg, var(--b-d1), var(--b-d2)); border-color: rgba(255,160,160,.5); }

.btn.warn { background: linear-gradient(180deg, var(--b-w1), var(--b-w2)); border-color: rgba(255,220,150,.55); color: #3a2a00; text-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--b-info); box-shadow: none; text-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--b-hover-bg); border-color: var(--b-sel-bd); filter: none; }
.row-actions { display: flex; gap: 8px; flex: none; }
.row-actions button { background: var(--b-neutral-bg); border: 1px solid var(--b-neutral-bd); color: var(--b-neutral-ink); border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.row-actions button.edit { color: var(--b-info); border-color: var(--b-info-bd); } .row-actions button.del { color: var(--b-bad); border-color: var(--b-bad-bd); background: transparent; }
.row-actions button:hover { border-color: var(--b-sel-bd); }
.checks { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.checks label { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: #3fa9f5; }
input[type=date] { color-scheme: dark; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: #0b1f3f; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: 10px 18px; border-radius: 12px;
  z-index: 30; transition: all .2s ease; pointer-events: none; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 600px) { .dlg-body .grid2 { grid-template-columns: 1fr; } .row { flex-wrap: wrap; } }

/* Daily report screen */
textarea {
  width: 100%; min-height: 90px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--input-border); background: var(--input); color: #fff;
  font: inherit; font-size: 15px; outline: none; resize: vertical;
}
textarea:focus { border-color: var(--accent); }
input:disabled, select:disabled { opacity: .7; cursor: not-allowed; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.info-grid div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 8px 10px; }
.info-grid span { display: block; color: var(--muted); font-size: 12px; }
.info-grid b { display: block; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.rrow { border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: rgba(255,255,255,.03); }
.rrow-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rrow-head b { color: var(--yellow); font-size: 14px; }
.rrow-head button { background: none; border: none; color: var(--b-bad); font: inherit; font-size: 13px; cursor: pointer; }
.rgrid { display: grid; gap: 0 12px; }
.rgrid.c2 { grid-template-columns: 1fr 1fr; }
.rgrid.c3 { grid-template-columns: 2fr 1fr 1fr; }
.rgrid.c4 { grid-template-columns: 1fr 1fr; }
.rgrid .field { margin-bottom: 10px; }
.add-row { background: none; border: 1.2px dashed rgba(255,255,255,.45); color: #fff; border-radius: 10px; padding: 9px; width: 100%; font: inherit; font-size: 14px; cursor: pointer; }
.add-row:hover { border-color: #fff; background: rgba(255,255,255,.05); }
.total-labor { margin-top: 10px; font-size: 14px; color: var(--muted); }
.total-labor b { color: #fff; font-size: 16px; }
.invalid { border-color: #ff6b6b !important; box-shadow: 0 0 0 2px rgba(255,107,107,.25); }
.field-error { color: #ff8a80; font-size: 12px; margin-top: 4px; }
.edit-banner { border-color: rgba(255,213,79,.6); padding: 10px 14px; margin-bottom: 14px; font-size: 14px; color: var(--yellow); text-align: center; }
.submit-bar { margin: 6px 0 30px; }
.report-row .edit-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: bold; color: #64b5f6; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.report-row .edit-locked { display: inline-block; margin-top: 8px; font-size: 13px; color: rgba(255,255,255,.55); }
@media (max-width: 640px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .rgrid.c3 { grid-template-columns: 1fr 1fr; }
  .rgrid.c3 > .field:first-child { grid-column: 1 / -1; }
}

/* Home and section screens (single centered column) */
.menu.single { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
.menu.single .menu-card { padding: 16px 18px; }
.page-head { text-align: center; margin: 0 0 18px; }
.page-head img { height: 64px; max-width: 170px; object-fit: contain; display: block; margin: 0 auto 10px; background: var(--icon-box); border: 1px solid var(--icon-box-border); border-radius: 14px; padding: 8px 14px; box-sizing: content-box; }

@media (min-width: 900px) {
  body.page-v2 .page-head img { height: 44px; max-width: 120px; padding: 6px 10px; margin: 0 auto 8px; border-radius: 12px; }
}
.page-head h1 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* Obstacles management screen */
.obs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.obs { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.obs.done { opacity: .72; }
.obs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.obs-head .main { min-width: 0; }
.obs-head .main b { display: block; font-size: 15px; }
.obs-head .main > span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.obs-type { font-weight: bold; color: var(--yellow); font-size: 15px; }
.obs-desc { margin: 0; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.obs-meta { color: var(--muted); font-size: 13px; }
.obs-meta b { color: #fff; }
.obs-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.pill { flex: none; display: inline-block; font-size: 12px; font-weight: bold; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--b-chip-bd); }
.pill.warn { background: var(--b-warn-bg); color: var(--b-warn); border-color: var(--b-warn-bd); }
.pill.ok { background: var(--b-ok-bg); color: var(--b-ok); border-color: var(--b-ok-bd); }
.pill.prio { margin-inline-start: 6px; font-weight: normal; }
.pill.prio.high { background: var(--b-bad-bg); color: var(--b-bad); border-color: var(--b-bad-bd); }
.pill.prio.mid { background: var(--b-warn-bg); color: var(--b-warn); border-color: var(--b-warn-bd); }
.pill.prio.low { background: var(--b-info-bg); color: var(--b-info); border-color: var(--b-info-bd); }
@media (max-width: 600px) { .obs-list { grid-template-columns: 1fr; } }

/* Planning board: sections and screen cards, flat */
.plan-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 26px 4px 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.18); }
.plan-head:first-child { margin-top: 6px; }
.plan-head h2 { margin: 0; font-size: 18px; color: var(--yellow); }
.plan-head span { color: var(--muted); font-size: 13px; }

/* Planning board: collapsible sections (drop panels) */
.sec { margin-bottom: 16px; overflow: hidden; }
.sec > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary:hover { background: rgba(255,255,255,.04); }
.sec > summary > img { width: 44px; height: 44px; flex: none; padding: 6px; background: var(--icon-box); border: 1px solid var(--icon-box-border); border-radius: 12px; box-sizing: border-box; }
.sec .t { flex: 1; min-width: 0; }
.sec .t b { display: block; font-size: 18px; color: var(--yellow); }
.sec .t span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.sec .chev { flex: none; font-size: 18px; color: var(--muted); transition: transform .15s ease; }
.sec:not([open]) .chev { transform: rotate(90deg); }
.sec .menu { padding: 4px 16px 16px; }
.sec .menu-card { background: rgba(255,255,255,.04); }

/* 3D look (enabled by class d3 on main): same navy identity with a thin white border, gradient surfaces lit from above, beveled edges, depth shadows, slight lift and tilt on hover */
.d3 .glass {
  background: linear-gradient(150deg, rgba(48,72,118,.78) 0%, rgba(22,36,68,.88) 55%, rgba(12,22,46,.94) 100%);
  border: 1.2px solid rgba(255,255,255,.26);
  border-top-color: rgba(255,255,255,.6);
  border-bottom-color: rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.28),
    inset 0 -3px 8px rgba(0,0,0,.35),
    0 1px 0 rgba(255,255,255,.06),
    0 14px 28px -8px rgba(0,0,0,.6),
    0 4px 10px rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
}
.d3 .menu { perspective: 1000px; }
.d3 .menu-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
  will-change: transform;
}
.d3 .menu-card::after {                       /* Light sheen that follows the mouse */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.16), transparent 60%);
  opacity: 0; transition: opacity .18s ease-out;
}
.d3 .menu-card:hover {
  transform: translateY(-5px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(255,255,255,.55);
  border-top-color: rgba(255,255,255,.85);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.4),
    inset 0 -3px 8px rgba(0,0,0,.35),
    0 26px 38px -10px rgba(0,0,0,.7),
    0 8px 14px rgba(0,0,0,.4);
}
.d3 .menu-card:hover::after { opacity: 1; }
.d3 .menu-card:active { transform: translateY(-1px) scale(.995); }
.d3 .menu-card .icon-box,
.d3 .sec > summary > img {
  background: linear-gradient(160deg, #f6fcff 0%, #d4ecfd 55%, #b4dbf6 100%);
  border: 1px solid #9fcdef;
  box-shadow:
    inset 0 2px 0 #fff,
    inset 0 -4px 8px rgba(30,90,168,.28),
    0 8px 14px -2px rgba(0,0,0,.55),
    0 2px 0 rgba(255,255,255,.12);
  transform: none;
}
.d3 .menu-card .icon-box img { filter: drop-shadow(0 3px 3px rgba(11,45,91,.35)); }
.d3 .menu-card .text b { text-shadow: 0 2px 4px rgba(0,0,0,.45); }
.d3 .menu-card .arrow { text-shadow: 0 2px 3px rgba(0,0,0,.5); }

/* Board sections */
.d3 .sec { overflow: visible; }
.d3 .sec > summary { border-radius: 20px; }
.d3 .sec > summary:hover { background: rgba(255,255,255,.05); }
.d3 .sec .t b { text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.d3 .sec .menu-card { background: linear-gradient(150deg, rgba(58,86,138,.7), rgba(18,30,60,.9)); }

/* Pressable raised buttons */
.d3 .btn {
  background: linear-gradient(180deg, var(--b-p1), var(--b-p2));
  border: 1px solid var(--b-bd);
  border-top-color: var(--b-bd-top);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 rgba(0,0,0,.35), 0 8px 16px -10px rgba(0,0,0,.75);
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.d3 .btn.secondary {
  background: var(--b-neutral-bg);
  box-shadow: none;
  border: 1px solid var(--b-neutral-bd);
  color: var(--b-neutral-ink);
}
.d3 .btn.green {
  background: linear-gradient(180deg, var(--b-g1), var(--b-g2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 rgba(0,0,0,.35), 0 8px 16px -10px rgba(0,0,0,.75);
}
.d3 .btn:hover:not(:disabled) { transform: translateY(-1px); }
.d3 .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 #0b2d5b, 0 3px 6px rgba(0,0,0,.4); }

/* Obstacles screen: raised cards, numbers and filters */
.d3 .obs { transition: transform .18s ease-out, box-shadow .18s ease-out; }
.d3 .obs:hover { transform: translateY(-4px); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.34), inset 0 -3px 8px rgba(0,0,0,.35), 0 24px 34px -10px rgba(0,0,0,.7), 0 6px 12px rgba(0,0,0,.4); }
.d3 .obs.done { opacity: .78; }
.d3 .stat b { text-shadow: 0 3px 6px rgba(0,0,0,.55); }
.d3 .pill { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 4px rgba(0,0,0,.35); }
.d3 input, .d3 select { box-shadow: inset 0 3px 6px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.12); }

@media (prefers-reduced-motion: reduce) {
  .d3 .menu-card, .d3 .obs, .d3 .btn { transition: none; }
  .d3 .menu-card:hover, .d3 .obs:hover { transform: none; }
}

/* Background (class nb on body): applied to all pages except login and home; fixed bottom image (nothing is cropped on resize); logo and credits are separate elements. */
@media (min-width: 900px) {
  body.nb { background: transparent; }
  body.nb::before {                       /* Light navy veil over the image to keep text readable */
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-color: #00204a;
    background-image:
      linear-gradient(180deg, rgba(0, 26, 60, .30) 0%, rgba(0, 26, 60, .18) 100%);
    background-size: auto, cover;
    background-position: 0 0, center bottom;
    background-repeat: no-repeat;
  }
  body.nb::after { display: none; }
  body.nb .page { min-height: 100vh; padding-bottom: 120px; max-width: 1560px; }
  body.nb .page::after, body.nb .page::before {   /* Credit lines at the page end */
    position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; direction: ltr;
  }
  body.nb .page::after {
    content: "© 2026 Bonyan Co."; bottom: 36px; padding-top: 14px;
    font-size: 14px; letter-spacing: .08em; color: rgba(206, 222, 242, .92);
    background: linear-gradient(90deg, transparent, rgba(190, 210, 235, .45), transparent) top center / 380px 1px no-repeat;
  }
  body.nb .page::before {
    content: none;
  }
  body.nb .nb-dev { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; pointer-events: none; font-size: 12px; letter-spacing: .07em; font-weight: 400; color: rgba(200, 216, 238, .98); }
  body.nb .nb-dev .nb-dev-c { display: none; }
  body.nb .nb-dev b { font-family: "Dancing Script", cursive; font-weight: 600; font-size: 1.2em; line-height: 1; letter-spacing: .02em; color: #fff; vertical-align: -.08em; }
}
/* Mobile: credit lines at the end of each page content (not fixed, so they do not cover work) */
@media (max-width: 899px) {
  body.nb .page::after {
    content: none;
  }
  body.nb .nb-dev { display: block; text-align: center; pointer-events: none; margin-top: 28px; padding: 12px 0 calc(6px + env(safe-area-inset-bottom)); font-size: 11px; line-height: 1.8; letter-spacing: .06em; color: rgba(205, 220, 240, .95);
    background: linear-gradient(90deg, transparent, rgba(190, 210, 235, .45), transparent) top center / 240px 1px no-repeat; }
  body.nb .nb-dev span { display: block; }
  body.nb .nb-dev b { font-family: "Dancing Script", cursive; font-weight: 600; font-size: 1.2em; line-height: 1; letter-spacing: .02em; color: #fff; vertical-align: -.08em; }
  body.nb .page::after { content: none; direction: ltr; text-align: center; pointer-events: none;
    margin-top: 28px; padding: 12px 0 calc(6px + env(safe-area-inset-bottom));
    font-size: 11px; line-height: 1.8; letter-spacing: .06em; font-weight: 700; color: rgba(205, 220, 240, .95);
    background: linear-gradient(90deg, transparent, rgba(190, 210, 235, .45), transparent) top center / 240px 1px no-repeat;
  }
}
/* Unified background for the whole site: login (class login) + all pages on mobile. Image fixed at the bottom, sky same color above. */
body.login { background: transparent; }
body.login::after { display: none; }
body.login::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: #00204a;
  background-image:
    linear-gradient(180deg, rgba(0, 26, 60, .30) 0%, rgba(0, 26, 60, .18) 100%);
  background-size: auto, cover;
  background-position: 0 0, center bottom;
  background-repeat: no-repeat;
}
@media (max-width: 899px) {
  body.nb { background: transparent; }
  body.nb::after { display: none; }
  body.nb::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
      linear-gradient(180deg, rgba(0, 26, 60, .30) 0%, rgba(0, 26, 60, .18) 100%);
    background-repeat: no-repeat;
  }
  body.nb::before, body.login::before {
    background-color: #00224f;
    background-size: auto, auto 56vh;
    background-position: 0 0, center bottom;
  }
}
@media print { body.login::before { display: none !important; } }
@media print { body.nb::before, body.nb::after, body.nb .page::before, body.nb .page::after { display: none !important; } }

/* Overall layout: unified top bar at content width (pages with nb): [company logo] | [back] ... [email] [sign out] */
@media (min-width: 900px) {
  body.nb .brand { display: none; }                      /* Logo is now inside the bar */
  body.nb .page { padding-top: 116px; }
  body.nb .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 92px; margin: 0;
    padding: 0 max(20px, calc((100vw - 1560px) / 2 + 16px));   /* Same edges as the content */
    display: flex; align-items: center; gap: 14px; font-size: 14px;
    background: linear-gradient(180deg, rgba(8, 26, 56, .94), rgba(10, 32, 66, .80));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .38), inset 0 -1px 0 rgba(255, 255, 255, .05);
  }
  body.nb .topbar::before {                               /* Company logo: first item in the bar (rightmost of the content) */
    content: ""; flex: none; width: 150px; height: 80px; margin-inline-end: 8px; padding-inline-end: 22px;
    background: url("../img/company_logo.png") right center / contain no-repeat;
    background-origin: content-box;
    border-inline-end: 1px solid rgba(255, 255, 255, .2);
  }
  body.nb .topbar > a {                                   /* Back button */
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .07);
    color: #fff; font-weight: bold; text-decoration: none; transition: background .12s, border-color .12s;
  }
  body.nb .topbar > a:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .6); }
  body.nb #userBar { margin-inline-start: auto; gap: 12px; }
  body.nb #userBar > span { color: var(--muted); padding: 7px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
  body.nb #userBar .link-btn.danger {
    padding: 8px 14px; border-radius: 10px; border: 1px solid var(--b-bad-bd);
    background: var(--b-bad-bg); color: var(--b-bad); font-weight: bold;
  }
  body.nb #userBar .link-btn.danger:hover { background: rgba(229, 57, 53, .32); border-color: rgba(255, 180, 180, .8); }
}
@media print {
  body.nb .topbar { position: static; height: auto; background: none; box-shadow: none; border: 0; padding: 0; }
  body.nb .topbar::before { display: none; }
  body.nb .page { padding-top: 0; }
}

/* Transparent cards and boxes (background shows through) */
@media (min-width: 900px) {
  body.nb .glass, body.nb .panel, body.nb .stat, body.nb .obs, body.nb .menu-card, body.nb .sec .menu-card, body.nb .login-box {
    background: linear-gradient(150deg, rgba(60, 94, 152, .30), rgba(10, 24, 54, .40));
    backdrop-filter: blur(8px) saturate(1.2);
    border-color: rgba(255, 255, 255, .20);
    border-top-color: rgba(255, 255, 255, .46);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 6px rgba(0, 0, 0, .18), 0 12px 26px -12px rgba(0, 0, 0, .5);
  }
  body.nb .menu-card:hover, body.nb .obs:hover { background: linear-gradient(150deg, rgba(74, 112, 176, .34), rgba(14, 30, 64, .38)); }
  /* Planning sections: no outer box; section title with an underline; the cards are the glass elements */
  body.nb .sec { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; margin-bottom: 10px; }
  body.nb .sec > summary { border-radius: 14px; padding: 12px 16px; background: linear-gradient(150deg, rgba(60, 94, 152, .26), rgba(10, 24, 54, .38)); backdrop-filter: blur(8px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .20); border-top-color: rgba(255, 255, 255, .42); }
  body.nb .sec > summary:hover { background: linear-gradient(150deg, rgba(74, 112, 176, .34), rgba(14, 30, 64, .42)); }
  body.nb .sec .menu { padding: 16px 0 6px; }
  /* Rows and fields */
  body.nb .row { background: rgba(10, 24, 54, .34); backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .34); }
  body.nb .row:hover { background: rgba(60, 94, 152, .32); }
  body.nb input, body.nb select, body.nb textarea { background: rgba(10, 24, 54, .50); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .3); }
  body.nb .rrow { background: rgba(255, 255, 255, .02); }
  body.nb .info-grid div { background: rgba(255, 255, 255, .06); }
  /* Text legibility over the background */
  body.nb .glass, body.nb .panel, body.nb .menu-card, body.nb .obs, body.nb .row, body.nb .stat, body.nb .sec > summary, body.nb .page-head, body.nb h1.title, body.nb .subtitle {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
  }
  body.nb .menu-card .text > span, body.nb .subtitle, body.nb .muted { color: #dbe5f1; }
}

/* Main board: project cards + data completeness */
.stats.five { grid-template-columns: repeat(5, 1fr); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; perspective: 1200px; }
.pcard {
  position: relative; display: block; padding: 16px 18px 14px; color: inherit; text-decoration: none;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
}
.pcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.16), transparent 60%);
  opacity: 0; transition: opacity .18s ease-out;
}
.pcard:hover { transform: translateY(-5px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); border-color: rgba(255,255,255,.55); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.4), 0 26px 38px -10px rgba(0,0,0,.7), 0 8px 14px rgba(0,0,0,.4); }
.pcard:hover::after { opacity: 1; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pc-head b { font-size: 18px; text-shadow: 0 2px 4px rgba(0,0,0,.45); }
.pc-head .pct { font-size: 26px; font-weight: bold; color: #7cc4ff; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pcard .pbar { height: 12px; margin: 10px 0 8px; }
.pc-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--b-chip-bd); background: var(--b-tray-bg); font-weight: 700; }
.chip.ok { color: var(--b-ok); border-color: var(--b-ok-bd); background: var(--b-ok-bg); }
.chip.warn { color: var(--b-warn); border-color: var(--b-warn-bd); background: var(--b-warn-bg); }
.pc-foot { font-size: 12px; }
.dqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 22px; padding: 6px 16px 12px; }
.dq-h { display: flex; justify-content: space-between; font-size: 13px; }
.dq small { color: var(--muted); font-size: 12px; }
@media (max-width: 899px) { .stats.five { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transition: none; transform: none; } }

/* Data completeness section: full glass box so text reads over the background */
@media (min-width: 900px) {
  body.nb .dqsec { background: linear-gradient(150deg, rgba(60, 94, 152, .34), rgba(10, 24, 54, .62)); backdrop-filter: blur(10px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .20); border-top-color: rgba(255, 255, 255, .42); border-radius: 20px; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); margin-top: 18px; }
  body.nb .dqsec > summary { background: transparent; border: 0; backdrop-filter: none; }
}

/* Project page: tabs + calendar + helper elements */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 0 8px; scrollbar-width: thin; }
.tabs[hidden], section[hidden] { display: none !important; }
.tabs button {
  flex: none; font: inherit; font-weight: 600; color: var(--ds-text-2, #cbd5e1); cursor: pointer; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--b-tray-bd); border-top-color: var(--b-tray-bd);
  background: var(--b-tray-bg);
  box-shadow: none;
  transition: transform .15s, background .15s, border-color .15s;
  transform: none;
}
.tabs button:hover { transform: none; border-color: var(--b-sel-bd); }
.tabs button.on {
  color: var(--b-sel-ink); border-color: var(--b-sel-bd); border-top-color: var(--b-sel-bd);
  background: var(--b-sel-bg);
  box-shadow: none;
  font-weight: 700;
}
.pbar.big { height: 18px; }
.pbar.big .pfill, .pbar.big { border-radius: 10px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.legend .c-has, .legend .c-miss, .legend .c-off { height: 12px; width: 12px; border-radius: 4px; }
.legend .c-has { background: #2e9e5a; } .legend .c-miss { background: #c8433a; } .legend .c-off { background: rgba(255,255,255,.25); }
.mini { display: flex; align-items: center; gap: 8px; } .mini .pbar { flex: 1; margin: 0; } .mini b { min-width: 38px; }
.table small { display: block; font-size: 12px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-h { text-align: center; color: var(--muted); font-size: 13px; padding: 4px 0; }
.cal-d {
  font: inherit; color: #fff; min-height: 70px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: default;
}
.cal-d b { font-size: 18px; } .cal-d small { font-size: 12px; opacity: .9; }
.cal-d.empty { visibility: hidden; }
.cal-d.has { cursor: pointer; background: linear-gradient(150deg, rgba(46,160,90,.65), rgba(20,90,50,.65)); border-color: rgba(143,227,168,.65); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 12px -6px rgba(0,0,0,.6); transition: transform .12s; }
.cal-d.has:hover { transform: translateY(-3px); }
.cal-d.miss { background: linear-gradient(150deg, rgba(200,67,58,.55), rgba(110,28,28,.55)); border-color: rgba(255,150,140,.6); }
.cal-d.off, .cal-d.future { opacity: .45; }
.cal-d.pending { border-style: dashed; }
.cal-d.today { outline: 2px solid #ffd54f; outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--b-tray-bd); border-radius: 10px; overflow: hidden; background: var(--b-tray-bg); }
.seg button { font: inherit; color: var(--ds-text-2, #cbd5e1); background: transparent; border: 0; padding: 8px 16px; cursor: pointer; }
.seg button.on { background: var(--b-sel-bg); font-weight: bold; color: var(--b-sel-ink); }
.page-head h1 { margin-bottom: 4px; }
@media (max-width: 700px) { .cal-h { font-size: 10px; } .cal-d { min-height: 52px; } .cal-d b { font-size: 14px; } .cal-d small { font-size: 10px; } .cal-grid { gap: 4px; } }
@media print { .tabs { display: none !important; } section[hidden] { display: block !important; } }

/* Coming weeks */
.la-banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 6px 0 4px; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.la-banner:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.55); }
.la-banner img { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(160deg, #f6fcff, #b4dbf6); padding: 6px; box-shadow: inset 0 2px 0 #fff, 0 6px 12px -2px rgba(0,0,0,.5); }
.la-banner .t { flex: 1; display: flex; flex-direction: column; gap: 3px; } .la-banner .t b { font-size: 16px; } .la-banner .t span { font-size: 13px; color: var(--muted); } .la-banner em { font-style: normal; font-weight: bold; }
.la-banner .chev { font-size: 26px; color: var(--muted); }
.row.la { border-inline-start: 4px solid rgba(255,255,255,.25); }
.row.la.crit { border-inline-start-color: #ff6b61; background: rgba(200, 67, 58, .16); }
.empty.small { padding: 10px; font-size: 13px; }
.row.la .main > span b, .row.la .main > span strong { display: inline; }
body.nb .section-title { color: #dbe7f6; text-shadow: 0 1px 5px rgba(0, 0, 0, .85); }

/* Gantt */
.gantt-wrap { overflow-x: auto; }
.gantt { min-width: 780px; }
.g-head, .g-row { display: flex; align-items: stretch; }
.g-lab { flex: none; width: var(--lab, 230px); padding: 0 6px; font-size: 13px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.g-head .g-lab { color: var(--muted); font-size: 13px; }
.g-axis { position: relative; flex: 1; height: 26px; border-bottom: 1px solid rgba(255,255,255,.3); }
.g-axis span { position: absolute; top: 3px; padding-right: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.g-body { position: relative; }
.g-over { position: absolute; top: 0; bottom: 0; left: 0; right: var(--lab, 230px); pointer-events: none; }
.g-gl { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.1); }
.g-today { position: absolute; top: 0; bottom: 0; width: 0; border-right: 2px dashed #ffd54f; z-index: 3; }
.g-today b { position: absolute; top: -2px; right: 4px; font-size: 11px; color: #ffd54f; text-shadow: 0 1px 3px #000; }
.g-row { height: 40px; border-bottom: 1px solid rgba(255,255,255,.07); }
.g-row:hover { background: rgba(255,255,255,.04); }
.g-track { position: relative; flex: 1; }
.g-bar {
  position: absolute; top: 9px; height: 22px; border-radius: 8px; overflow: hidden; z-index: 2;
  background: rgba(143,184,255,.28); border: 1px solid rgba(143,184,255,.75);
  box-shadow: 0 4px 8px -3px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.2);
}
.g-fill { position: absolute; right: 0; top: 0; bottom: 0; background: linear-gradient(270deg, #1e5aa8, #3fa9f5); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.g-bar span { position: relative; z-index: 1; display: block; text-align: center; line-height: 20px; font-size: 12px; font-weight: bold; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.g-bar.late { border-color: #ff6b61; background: rgba(255,107,97,.25); }
.g-bar.late .g-fill { background: linear-gradient(270deg, #b83a32, #ff6b61); }
.g-bar.done { border-color: #5cc888; } .g-bar.done .g-fill { background: linear-gradient(270deg, #1f7a45, #2e9e5a); }
.g-bar.approx { border-style: dashed; }
@media print { .gantt-wrap { overflow: visible; } .gantt { min-width: 0; } }

/* Obstacles kanban */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 14px; }
.kcol { border-radius: 18px; padding: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(8, 22, 50, .35); backdrop-filter: blur(6px); min-height: 120px; transition: border-color .15s, background .15s; }
.kcol header { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; font-size: 15px; }
.kcol.open header b { color: #ffcf8a; } .kcol.progress header b { color: #7cc4ff; } .kcol.resolved header b { color: #8fe3a8; }
.kcount { min-width: 28px; text-align: center; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: bold; font-size: 13px; }
.kbody { display: flex; flex-direction: column; gap: 12px; }
.kcol.over { border-color: #ffd54f; background: rgba(40, 80, 150, .35); }
.kcol .obs { cursor: grab; }
.kcol .obs.dragging { opacity: .45; }
.kcol .obs.open { border-inline-start: 4px solid #ffb74d; }
.kcol .obs.progress { border-inline-start: 4px solid #3fa9f5; }
.kcol .obs.resolved { border-inline-start: 4px solid #2e9e5a; opacity: .88; }
.kempty { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 0; border: 1px dashed rgba(255,255,255,.2); border-radius: 12px; }
@media (max-width: 1000px) { .kanban { grid-template-columns: 1fr; } }
.pill.prog { background: var(--b-info-bg); color: var(--b-info); border: 1px solid var(--b-info-bd); }
.stats.four .st-blue, .st-blue { color: #7cc4ff; }

/* Obstacles kanban */
.kb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }

@media (min-width: 1100px) {
  body.page-v2 .kb, body.page-v2 .kanban { max-width: 1080px; margin-inline: auto; }
}
.kb-col { border-radius: 18px; border: 1px solid rgba(255,255,255,.18); border-top-color: rgba(255,255,255,.38); background: rgba(8, 22, 50, .38); backdrop-filter: blur(8px); padding: 10px; transition: background .15s, border-color .15s; min-height: 120px; }
.kb-col.over { background: rgba(40, 110, 200, .30); border-color: #7cc4ff; }
.kb-col header { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; border-bottom: 3px solid var(--kc, #ffb74d); margin-bottom: 10px; }
.kb-col header b { font-size: 16px; } .kb-n { min-width: 28px; text-align: center; padding: 2px 8px; border-radius: 999px; font-weight: bold; background: rgba(255,255,255,.14); }
.kb-col.c-open { --kc: #ffb74d; } .kb-col.c-progress { --kc: #5aa9ff; } .kb-col.c-done { --kc: #4cc27f; }
.kb-body { display: flex; flex-direction: column; gap: 10px; max-height: 68vh; overflow-y: auto; padding: 2px; }
.kb-empty { text-align: center; color: var(--muted); padding: 22px 0; font-size: 13px; }
.kb-card { cursor: grab; padding: 12px 14px; gap: 7px; }
.kb-card.dragging { opacity: .45; transform: scale(.98); }
.kb-card .obs-actions .btn { padding: 5px 10px; font-size: 12px; }
.kb-card .obs-desc { font-size: 13px; line-height: 1.7; }
@media (max-width: 1000px) { .kb { grid-template-columns: 1fr; } .kb-body { max-height: none; } }

/* Project health indicator */
.hdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-inline-end: 8px; vertical-align: middle; background: #8896ab; box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 10px currentColor; color: #8896ab; }
.hdot.h-green { background: #3fd37a; color: #3fd37a; } .hdot.h-yellow { background: #ffc94d; color: #ffc94d; } .hdot.h-red { background: #ff5f55; color: #ff5f55; } .hdot.h-gray { background: #8896ab; color: #8896ab; }
.pcard { border-inline-start: 5px solid #8896ab; }
.pcard.h-green { border-inline-start-color: #3fd37a; } .pcard.h-yellow { border-inline-start-color: #ffc94d; } .pcard.h-red { border-inline-start-color: #ff5f55; }
.health-row { margin-top: 12px; }
.page-head p .hdot { margin-inline-end: 6px; }

/* General calendar */
.cal-d.cg { min-height: 88px; justify-content: flex-start; padding: 7px 4px; cursor: pointer; transition: transform .12s, border-color .12s; }
.cal-d.cg:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.55); }
.cal-d.cg.sel { outline: 2px solid #7cc4ff; outline-offset: 1px; background: rgba(60, 120, 210, .28); }
.cal-d.cg.off, .cal-d.cg.future { opacity: .55; }
.dcs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.dc { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); white-space: nowrap; }
.dc.ok { background: rgba(46,160,90,.45); border-color: rgba(143,227,168,.7); }
.dc.mid { background: rgba(230,170,40,.40); border-color: rgba(255,207,138,.8); }
.dc.bad { background: rgba(200,67,58,.50); border-color: rgba(255,150,140,.8); }
.dc.due { background: rgba(63,169,245,.28); border-color: rgba(124,196,255,.75); } .dc.due.late { background: rgba(200,67,58,.40); border-color: rgba(255,150,140,.8); }
.legend .c-mid { background: #d9a03a; height: 12px; width: 12px; border-radius: 4px; }
a.row.due-row { color: inherit; text-decoration: none; display: flex; }
@media (max-width: 700px) { .cal-d.cg { min-height: 64px; } .dc { font-size: 10px; padding: 0 4px; } }

/* Alerts bell */
.bell-wrap { position: relative; flex: none; }
.bell-btn { position: relative; width: var(--b-ic); height: var(--b-ic); border-radius: var(--b-r); cursor: pointer; font-size: 18px; line-height: 1;
  border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { background: var(--b-hover-bg); }
.bell-btn.has .bell-ic { display: inline-block; animation: bellring 2.4s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes bellring { 0%,100% { transform: rotate(0) } 10%,30% { transform: rotate(14deg) } 20%,40% { transform: rotate(-14deg) } 50% { transform: rotate(0) } }
.bell-badge { position: absolute; top: -6px; inset-inline-start: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--b-d2); color: #fff; font-size: 11px; line-height: 20px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.4);
  font-weight: 700; }
.bell-panel { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; width: min(380px, 92vw); max-height: 70vh; display: flex; flex-direction: column;
  border-radius: 14px; background: #0a1e3e; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 18px 44px rgba(0,0,0,.55); color: #fff; overflow: hidden; }
.bell-panel[hidden] { display: none; }
.bell-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.bell-rf { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 13px; }
.bell-body { overflow: auto; padding: 6px 0; }
.bell-g { padding: 8px 14px 4px; font-size: 12px; color: var(--muted); font-weight: bold; }
.bell-it { display: flex; gap: 10px; padding: 9px 14px; color: #fff; text-decoration: none; align-items: flex-start; }
.bell-it:hover { background: rgba(255,255,255,.09); }
.bell-it div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.bell-it span { color: #cfd9ea; font-size: 12px; }
.bell-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #fb8c00; }
.bell-it.red .bell-dot { background: var(--b-d2); }
.bell-empty { padding: 22px 14px; text-align: center; color: var(--muted); }
.bell-f { padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid rgba(255,255,255,.1); text-align: center; }
@media (max-width: 899px) { .bell-wrap { margin-inline-start: 8px; } .bell-panel { position: fixed; inset-inline: 8px; width: auto; max-width: 440px; margin-inline: auto; max-height: calc(100vh - 110px); } }
@media print { .bell-wrap { display: none; } }

/* Daily report wizard: fixed data on top + sections list on the right + Next */
.wiz { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 24px; }
.wiz-rail { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 110px; }
.wiz-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; color: var(--ds-text-2, #cbd5e1); text-align: start;
  border: 1px solid var(--b-tray-bd); background: var(--b-tray-bg); backdrop-filter: blur(6px); transition: background .12s, border-color .12s, transform .12s; }
.wiz-tab:hover { background: var(--b-hover-bg); }
.wiz-tab i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: bold; background: rgba(255,255,255,.14); }
.wiz-tab span { flex: 1; }
.wiz-tab em { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 10px; font-style: normal; font-size: 12px; line-height: 22px; text-align: center; background: var(--b-ok-bg); color: var(--b-ok); }
.wiz-tab em:empty { display: none; }
.wiz-tab.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); box-shadow: none; transform: translateX(-4px); color: var(--b-sel-ink); }
.wiz-tab.on i { background: rgba(255,255,255,.28); }
.wiz-tab.done i { background: var(--b-g2); }
.wiz-tab.seen i { background: var(--b-warn-bg); }
.wiz-step[hidden] { display: none; }
.wiz-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.wiz-nav .btn { width: auto; min-width: 130px; margin: 0; }
.wiz-nav .btn:disabled { opacity: .4; cursor: default; }
.wiz-nav .btn[hidden] { display: none; }
.wiz-pos { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.wiz-nav #btnSubmit { margin-inline-start: auto; min-width: 200px; }
@media (max-width: 899px) {
  .wiz { grid-template-columns: 1fr; gap: 10px; }
  .wiz-rail { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; gap: 6px; scrollbar-width: thin; }
  .wiz-tab { width: auto; flex: none; padding: 8px 10px; font-size: 13px; }
  .wiz-tab.on { transform: none; }
  .wiz-nav { flex-wrap: wrap; } .wiz-pos { order: -1; flex-basis: 100%; }
  .wiz-nav .btn { flex: 1; }
}
@media (min-width: 1100px) { .wiz-top .info-grid { grid-template-columns: repeat(5, 1fr); } }

/* Subcontractors */
.stats.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .stats.three { grid-template-columns: 1fr 1fr; } }
.sub-card { padding: 14px 16px; margin-bottom: 10px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; margin-bottom: 8px; }
.sub-head .main { display: flex; flex-direction: column; gap: 3px; }
.sub-head .main span { color: var(--muted); font-size: 13px; }
.sub-n { text-align: center; } .sub-n b { display: block; font-size: 22px; } .sub-n small { color: var(--muted); }
.sub-card.open { border-color: rgba(255,255,255,.55); }
.sub-detail { margin-top: 12px; }
.sub-detail .tbl-wrap { overflow-x: auto; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover { background: rgba(255,255,255,.08); }

/* Side menu */
.sn-btn { display: none; }
.sidenav { position: fixed; top: 92px; inset-inline-start: max(20px, calc((100vw - 1560px) / 2 + 16px)); width: 210px; z-index: 15; display: flex; flex-direction: column; gap: 14px;
  padding: 14px 10px; border-radius: 14px; background: linear-gradient(180deg, rgba(12,34,70,.82), rgba(8,24,52,.82)); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.sn-g { display: flex; flex-direction: column; gap: 3px; }
.sn-g + .sn-g { padding-top: 4px; }
.sn-t { display: flex; align-items: center; gap: 11px; padding: 10px 12px; font-size: 14px; font-weight: bold; color: #fff; border-radius: 10px; background: rgba(255,255,255,.05); }
.sn-t svg { color: #7cc4ff; }
.sn-g.sub { gap: 2px; }
.sn-g.sub > a { margin-inline-start: 16px; padding: 8px 12px 8px 10px; font-size: 13px; border-radius: 8px; border-inline-start: 1px solid rgba(255,255,255,.14); border-start-start-radius: 0; border-end-start-radius: 0; }
.sn-g.sub > a svg { width: 16px; height: 16px; }
.sn-g.sub > a.on::before { inset-inline-start: -2px; inset-block: 6px; }
.sidenav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #d6e1f2; text-decoration: none; font-size: 14px; transition: background .12s, color .12s; }
.sidenav a svg { flex: none; opacity: .85; }
.sidenav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidenav a.on { background: rgba(60,140,230,.22); color: #fff; font-weight: bold; }
.sidenav a.on svg { opacity: 1; color: #7cc4ff; }
.sidenav a.on::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: -10px; width: 4px; border-radius: 4px; background: #4aa3ff; }
.sn-badge { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--b-d2); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-weight: 700; }
.sn-badge[hidden] { display: none; }
.sn-scrim { display: none; }
@media (min-width: 1100px) { body.has-nav .page { padding-inline-start: 236px; } }
@media (max-width: 1099px) {
  .sn-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--b-ic); height: var(--b-ic); border-radius: var(--b-r); cursor: pointer; font-size: 18px; color: var(--b-neutral-ink);
    border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); flex: none; }
  .sidenav { top: 0; bottom: 0; inset-inline-start: 0; width: min(270px, 82vw); border-radius: 0; padding-top: 20px; transform: translateX(100%); transition: transform .2s; z-index: 70; background: rgba(8,24,52,.98); overflow-y: auto; }
  .sidenav a.on::before { inset-inline-start: -6px; }
  body.sn-open .sidenav { transform: none; }
  body.sn-open .sn-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.5); }
}
@media print { .sidenav, .sn-btn { display: none; } body.has-nav .page { padding-inline-start: 0; } }
.mob-only { display: block; }
@media (min-width: 1100px) { .mob-only { display: none; } }

/* Consistency tuning: logo and side menu in one column + smaller cards */
@media (min-width: 900px) {
  /* Slimmer bar (76px) and horizontal logo: symbol on the right, name beside it */
  body.nb .topbar { height: 76px; }
  body.nb .page { padding-top: 98px; }
  body.nb .topbar::before {                  /* Width equals the side menu width so they align */
    width: 210px; height: 66px; margin-inline-end: 0; padding: 6px 12px; box-sizing: border-box;
    background: url("../img/company_logo_h.png") center / contain no-repeat; background-origin: content-box;
  }
}
@media (min-width: 1100px) {
  .sidenav { top: 92px; }
  body.has-nav .page { padding-inline-start: 246px; }
  .wiz-rail { top: 96px; }
  /* Smaller, calmer cards than the menu */
  body.has-nav .stats { gap: 10px; margin-bottom: 10px; }
  body.has-nav .stat { padding: 9px 12px; }
  body.has-nav .stat span { font-size: 12px; }
  body.has-nav .stat b { font-size: 22px; margin-top: 2px; }
  body.has-nav .stats.four .stat span { min-height: 0; }
  body.has-nav .pgrid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
  body.has-nav .pcard { padding: 12px 14px 10px; }
  body.has-nav .pc-head b { font-size: 15px; }
  body.has-nav .pc-head .pct { font-size: 22px; }
  body.has-nav .pcard .pbar { height: 10px; margin: 8px 0 6px; }
  body.has-nav .pc-sub { font-size: 12px; }
  body.has-nav .pc-chips { margin: 8px 0 6px; }
  body.has-nav .pc-foot { font-size: 12px; }
  body.has-nav .sec > summary, body.has-nav .la-banner { padding: 10px 14px; }
  body.has-nav .sec > summary > img { width: 38px; height: 38px; }
  body.has-nav .menu-card { padding: 10px 14px; }
  body.has-nav .page-head h1 { font-size: 24px; }
  body.has-nav .panel { padding: 12px 14px; margin-bottom: 10px; }
}
@media print { body.has-nav .page { padding-inline-start: 0; } }

/* Statistics dashboard */
.vz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.it-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.it-grid4 > .it-row { margin: 0; flex-direction: column; align-items: stretch; }
.it-grid4 > .it-row .it-act { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 1200px) { .it-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .it-grid4 { grid-template-columns: 1fr; } }
@media (max-width: 899px) { .vz-grid2 { grid-template-columns: 1fr; } }
.vz-card { margin-bottom: 0; }
.vz-card .panel-title { font-size: 15px; }
.stat.kpi small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.stats.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 899px) { .stats.five { grid-template-columns: 1fr 1fr; } }
.vz-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vz-donut { width: 170px; height: 170px; flex: none; }
.vz-big { font-size: 24px; font-weight: bold; fill: #fff; } .vz-sm { font-size: 9px; fill: #b6c5dc; }
.vz-leg { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.vz-card > .vz-leg { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 4px; }
.vz-leg span { display: flex; align-items: center; gap: 8px; } .vz-leg i { width: 11px; height: 11px; border-radius: 4px; flex: none; } .vz-leg b { margin-inline-start: 2px; }
.vz-stack { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; margin-top: 4px; } .vz-stack span { min-width: 6px; }
.vz-sub { margin: 14px 0 6px; font-size: 12px; color: var(--muted); }
.vz-bars { width: 100%; height: auto; display: block; }
.vz-grid { stroke: rgba(255,255,255,.1); stroke-width: 1; } .vz-ax { font-size: 11px; fill: #9fb0cb; }
.vz-hit { cursor: default; } .vz-hit:hover { filter: brightness(1.25); }
.vz-proj { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow: auto; padding-inline-end: 4px; }
.vz-pr { display: grid; grid-template-columns: 12px minmax(90px, 160px) 1fr 42px; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; color: inherit; text-decoration: none; font-size: 13px; }
.vz-pr:hover { background: rgba(255,255,255,.07); } .vz-pr b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; } .vz-pr em { font-style: normal; text-align: end; font-weight: bold; }
.vz-pr .pbar { margin: 0; height: 10px; }
.vz-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.vz-tip { position: fixed; z-index: 90; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: rgba(6,18,40,.96); border: 1px solid rgba(255,255,255,.25); font-size: 12px; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.vz-tip[hidden] { display: none; }
@media print { .vz-tip { display: none; } .vz-proj { max-height: none; } }

/* Smaller calendar */
.cal-grid { gap: 5px; }
.cal-d.cg { min-height: 58px; padding: 5px 3px; }
.cal-d.cg b { font-size: 14px; }
.dc { font-size: 11px; padding: 0 6px; }
.cal-d { min-height: 50px; }
.cal-d b { font-size: 15px; }
@media (min-width: 900px) { #result .cal-grid { max-width: 880px; margin-inline: auto; } }

/* Daily report screen + unified menu */
.sn-steps .sn-step { position: relative; display: flex; align-items: center; gap: 9px; width: calc(100% - 16px); margin-inline-start: 16px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; color: #d6e1f2;
  background: none; border: 0; border-inline-start: 1px solid rgba(255,255,255,.14); border-start-start-radius: 0; border-end-start-radius: 0; text-align: start; }
.sn-step:hover { background: rgba(255,255,255,.09); color: #fff; }
.sn-step i { flex: none; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: bold; background: rgba(255,255,255,.14); }
.sn-step span { flex: 1; } .sn-step sup { color: #ff8a80; }
.sn-step em { flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-style: normal; font-size: 12px; line-height: 20px; text-align: center; background: rgba(76,175,80,.28); color: #a5d6a7; }
.sn-step em:empty { display: none; }
.sn-step.on { background: rgba(60,140,230,.22); color: #fff; font-weight: bold; } .sn-step.on i { background: #1e6fd0; }
.sn-step.done i { background: #2e7d32; } .sn-step.seen i { background: rgba(255,213,79,.4); }
.wiz-progress { padding: 10px 16px; margin-bottom: 12px; }
.wp-t { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; } .wp-t span { color: #ffb74d; font-size: 12px; }
.wiz-progress .pbar { margin: 0; height: 9px; }
.step-hint { margin: -2px 0 12px; color: var(--muted); font-size: 13px; }
.wiz-review { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.2); }
.wiz-review h4 { margin: 0 0 10px; font-size: 14px; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rv { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; color: #fff; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.rv.ok { border-color: rgba(143,227,168,.55); background: rgba(46,160,90,.2); } .rv.bad { border-color: rgba(255,138,128,.7); background: rgba(200,67,58,.25); }
.rv:hover { background: rgba(255,255,255,.14); }
.rv-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
@media (min-width: 1100px) {
  body.has-nav .wiz { grid-template-columns: 1fr; }
  /* Report sections: horizontal tabs on top (not in the side menu) */
  body.has-nav .wiz-rail { flex-direction: row; gap: 8px; position: sticky; top: 84px; z-index: 9; padding: 8px; margin-bottom: 4px; border-radius: 14px;
    background: rgba(8, 26, 56, .86); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); }
  body.has-nav .wiz-tab { flex: 1; width: auto; justify-content: center; }
  body.has-nav .wiz-tab.on { transform: none; }
  body.has-nav .wiz-top .info-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1099px) { .sn-steps { display: none; } }

/* Itqan and Systems screens (desktop) */
.desk-only { display: none; }
@media (min-width: 1100px) { .desk-only { display: block; } }
.it-hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.it-hello h2 { margin: 0 0 4px; font-size: 20px; } .it-hello p { margin: 0; color: var(--muted); font-size: 13px; }
.it-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; margin-bottom: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); }
.it-row.clickable { cursor: pointer; } .it-row.clickable:hover { background: rgba(255,255,255,.1); }
.it-row.ok { border-color: rgba(143,227,168,.4); }
.it-row .main { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .it-row .main span { color: var(--muted); font-size: 12px; }
.it-act { display: flex; gap: 8px; flex: none; } .it-act .btn { margin: 0; text-decoration: none; }
.it-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 7px; background: #8896ab; }
.it-dot.ok { background: #3fd37a; } .it-dot.bad { background: #ffb74d; } .it-dot.off { background: #8896ab; }
.ad-table td, .ad-table th { white-space: nowrap; } .ad-c { min-width: 110px; } .ad-c small { color: var(--muted); font-size: 12px; }

/* Daily routine tasks (inside the report) */
.chk-roles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chk-role { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--ds-text-2, #cbd5e1); background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); }
.chk-role b { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--b-chip-bg); font-weight: 700; }
.chk-role.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); color: var(--b-sel-ink); }
.chk-role.full b { background: var(--b-ok-bg); color: var(--b-ok); }
.chk-role.off { opacity: .6; }
.chk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.chk-head .chk-count { color: var(--muted); font-size: 13px; margin-inline-start: auto; }
.chk-absent { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.chk-slot { margin-bottom: 12px; }
.chk-slot h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.chk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.chk-row.yes { border-color: rgba(63,211,122,.45); background: rgba(63,211,122,.07); }
.chk-row.no { border-color: rgba(255,120,100,.5); background: rgba(255,120,100,.07); }
.chk-t { flex: 1 1 240px; line-height: 1.6; }
.chk-btns { display: flex; gap: 6px; flex: none; }
.chk-b { padding: 7px 14px; border-radius: 10px; font: inherit; cursor: pointer; color: inherit; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); }
.chk-b.yes[aria-pressed="true"] { background: #1f9d57; border-color: #3fd37a; color: #fff; }
.chk-b.no[aria-pressed="true"] { background: #c4432f; border-color: #ff8a73; color: #fff; }
.chk-note { flex: 1 1 100%; }
.chk-sum { margin-top: 10px; color: var(--muted); font-size: 13px; }
.chk-absent input { width: auto; flex: none; margin: 0; }

/* Lists editor + HR */
.ck-slot { padding: 12px; margin-bottom: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.ck-slot-h { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ck-slot-h label { flex: 1 1 220px; font-size: 13px; color: var(--muted); }
.ck-slot textarea { width: 100%; min-height: 70px; }
.pfill.pf-g { background: linear-gradient(90deg, #1f9d57, #3fd37a); } .pfill.pf-y { background: linear-gradient(90deg, #c99a1f, #f0c53d); } .pfill.pf-r { background: linear-gradient(90deg, #c4432f, #ff8a73); }
.hr-bar { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 74px; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 13px; }
.hr-bar b { text-align: start; } .hr-bar small { color: var(--muted); display: block; font-size: 12px; }
.hr-reason { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.hr-line { stroke: #3987e5; stroke-width: 2.4; fill: none; } .hr-dot { fill: #3987e5; stroke: #0b1b3a; stroke-width: 1.5; }
@media (max-width: 700px) { .hr-bar { grid-template-columns: 1fr 64px; } .hr-bar .pbar { grid-column: 1 / -1; order: 3; } }

/* Current section title above the side menu (same in all sections) */
.sn-sec { display: flex; align-items: center; text-align: center; flex-direction: column; gap: 2px; padding: 4px 12px 10px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sn-sec span { font-size: 12px; color: var(--muted); }
.sn-sec b { font-size: 15px; color: #fff; text-align: center; }
.sn-step span { white-space: nowrap; }
html { scroll-behavior: smooth; }
#roles, #sites, #tasks, #people, #safety { scroll-margin-top: 96px; }

/* Report approval */
.ap-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: bold; border: 1px solid transparent; }
.ap-chip.ap-ok { background: var(--b-ok-bg); color: var(--b-ok); border-color: var(--b-ok-bd); }
.ap-chip.ap-bad { background: var(--b-bad-bg); color: var(--b-bad); border-color: var(--b-bad-bd); }
.ap-chip.ap-pending { background: var(--b-warn-bg); color: var(--b-warn); border-color: var(--b-warn-bd); }
.ap-box { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.ap-box label { display: block; font-size: 13px; color: var(--muted); } .ap-box textarea { width: 100%; margin-top: 6px; }
.ap-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ap-tabs button { padding: 8px 16px; border-radius: 10px; font: inherit; color: var(--ds-text-2, #cbd5e1); cursor: pointer; background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); font-weight: 600; }
.ap-tabs button.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); color: var(--b-sel-ink); font-weight: 700; }
.ap-tabs b { margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(240,197,61,.25); font-size: 11px; font-weight: 700; }
.ap-returned { padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; border: 1px solid rgba(255,120,100,.5); background: rgba(255,120,100,.1); }
.ap-returned a { color: #ffd2c8; }
@media print { .ap-box, .modal .actions { display: none !important; } }

/* Offline bar */
.offline-pill { position: fixed; z-index: 60; bottom: 14px; inset-inline-start: 50%; transform: translateX(50%); padding: 8px 16px; border-radius: 999px; background: var(--b-warn); color: var(--b-warn-ink); font-size: 13px; font-weight: bold; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.offline-pill[hidden] { display: none; }
.wx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.wx .wx-l { color: var(--muted); } .wx b { margin-inline-end: auto; } .wx select { width: auto; min-width: 150px; }
.sub-title { margin: 6px 0 8px; font-size: 14px; color: #cfe0ff; }

/* Punch list */
.pl-card { padding: 12px 14px; margin-bottom: 10px; }
.pl-card.late { border-color: rgba(255,120,100,.55) !important; }
.pl-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pl-head .main { display: flex; flex-direction: column; gap: 3px; } .pl-head .main span { color: var(--muted); font-size: 12px; }
.pl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-meta { margin-top: 6px; font-size: 13px; color: #d5e2f5; }
#pAdd > form { margin: 0; }

/* Contractor evaluation */
.rt-card { padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.rt-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .rt-h b { font-size: 15px; }
.rt-row { display: grid; grid-template-columns: minmax(150px, 220px) auto 1fr; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.rt-row em { color: var(--muted); font-style: normal; font-size: 12px; }
.rt-stars { display: flex; gap: 5px; direction: ltr; }
.rt-b { width: 34px; height: var(--b-ic-sm); border-radius: var(--b-r-sm); font: inherit; font-weight: bold; cursor: pointer; color: var(--b-info); background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); }
.rt-b.fill { background: var(--b-warn-bg); border-color: var(--b-warn-bd); color: #fff; }
.rt-b.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); color: var(--b-sel-ink); }
.rt-note { width: 100%; margin-top: 8px; }
.rt-add { display: flex; gap: 8px; margin-top: 6px; } .rt-add input { flex: 1; }
@media (max-width: 700px) { .rt-row { grid-template-columns: 1fr auto; } .rt-row em { display: none; } .rt-b { width: 38px; height: 36px; } }
.ev-c { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.ev-table tr.on td { background: rgba(60,140,255,.12); }
.ev-detail td { background: rgba(255,255,255,.03); }
.ev-d { padding: 6px 2px; white-space: normal; }
.eval-print { display: none; }
@media print {
  body.printing-eval > *:not(#evalPrint) { display: none !important; }
  body.printing-eval #evalPrint { display: block !important; }
  body.printing-eval { background: #fff !important; }
}
.ep { color: #10213f; font-family: "Tajawal", sans-serif; font-size: 12px; padding: 10mm; background: #fff; }
.ep-h { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #1d3b6e; margin-bottom: 10px; }
.ep-h h1 { margin: 0; font-size: 20px; color: #1d3b6e; } .ep-h p { margin: 4px 0 8px; }
.ep-h img { height: 60px; padding: 6px 10px; border-radius: 8px; background: #10213f; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ep h3 { margin: 12px 0 4px; font-size: 14px; color: #1d3b6e; }
.ep table { width: 100%; border-collapse: collapse; } .ep th, .ep td { border: 1px solid #9fb0c8; padding: 5px 7px; text-align: right; }
.ep th { background: #eef3fa; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ep-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; } .ep-sign div { border-top: 1px dashed #7b8ba3; padding-top: 6px; }

/* Today follow-up strip on the main board */
.today-strip { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.today-strip .ts-l { display: flex; align-items: center; padding: 0 6px; font-weight: bold; color: #cfe0ff; font-size: 13px; }
.ts-c { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; text-decoration: none; color: inherit; font-size: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.ts-c b { font-size: 18px; } .ts-c.ok b { color: #8fe3a8; } .ts-c.bad { border-color: rgba(255,150,120,.5); background: rgba(255,120,100,.1); } .ts-c.bad b { color: #ffab9b; }
.ts-c:hover { background: rgba(255,255,255,.12); }
.ts-c[hidden] { display: none; }

/* Routine tasks: timeline and tiles layouts */
.ck-heads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.ck-rc, .ck-rb { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; cursor: pointer; font: inherit; color: inherit; text-align: start; background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); }
.ck-rc.on, .ck-rb.on { border-color: var(--b-sel-bd); background: var(--b-sel-bg); box-shadow: none; color: var(--b-sel-ink); }

.ck-rc.on small, .ck-rb.on small { color: rgba(255,255,255,.85); }
.ck-rc.off, .ck-rb.off { opacity: .55; }
.ck-ring { width: 52px; height: 52px; flex: none; } .ck-ring .trk { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 5; }
.ck-ring .val { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .3s; } .ck-ring text { fill: #fff; font-size: 12px; font-weight: bold; }
.ck-ring.go .val { stroke: #3987e5; } .ck-ring.ok .val { stroke: #3fd37a; } .ck-ring.warn .val { stroke: #f0c53d; }
.ck-off { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); flex: none; }
.ck-rt { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ck-rt small, .ck-rb small { color: var(--muted); font-size: 12px; }
.ck-bar { padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); } .ck-bar .ck-title { font-size: 15px; } .ck-bar .chk-count { margin-inline-start: 6px; margin-inline-end: auto; }
.ck-tl { position: relative; }
.ck-tls { display: grid; grid-template-columns: 110px 1fr; gap: 14px; position: relative; padding-bottom: 12px; }
.ck-tls::before { content: ""; position: absolute; inset-inline-start: 54px; top: 46px; bottom: 0; width: 2px; background: rgba(255,255,255,.12); }
.ck-node { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgba(57,135,229,.16); border: 1px solid rgba(57,135,229,.45); height: fit-content; position: relative; z-index: 1; }
.ck-node b { font-size: 12px; direction: ltr; } .ck-node small { color: var(--muted); } .ck-node.full { background: rgba(63,211,122,.16); border-color: rgba(63,211,122,.5); }
.ck-tlt { display: flex; flex-direction: column; gap: 6px; }
.ck-tlr { margin: 0; padding: 8px 12px; border-inline-start: 4px solid rgba(255,255,255,.18); }
.ck-tlr.yes { border-inline-start-color: #3fd37a; } .ck-tlr.no { border-inline-start-color: #ff8a73; }
.ck-tlr.yes .chk-t { color: var(--b-ok); }
.ck-seg { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--b-tray-bd); flex: none; }
.ck-seg .chk-b { border: 0; border-radius: 0; width: 44px; padding: 7px 0; font-size: 15px; }
.ck-seg .chk-b + .chk-b { border-inline-start: 1px solid var(--b-tray-bd); }
.ck-tiles .chk-row, .ck-tlt .chk-row { flex-wrap: wrap; }
.ck-rb { flex-direction: column; align-items: stretch; }
.ck-rn { font-weight: bold; }
.ck-stack { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.1); }
.ck-stack .d { background: #3fd37a; } .ck-stack .m { background: #ff8a73; }
.ck-hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.ck-tslot h4 { margin: 10px 0 6px; font-size: 13px; color: var(--muted); }
.ck-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ck-tile { margin: 0; padding: 0; display: flex; flex-direction: column; }
.chk-cyc { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 12px; font: inherit; color: inherit; text-align: start; cursor: pointer; background: none; border: 0; }
.ck-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); font-style: normal; font-weight: bold; }
.ck-tile.yes .ck-ic { background: #1f9d57; border-color: #3fd37a; } .ck-tile.no .ck-ic { background: #c4432f; border-color: #ff8a73; }
.ck-tile .chk-note { margin: 0 12px 10px; width: auto; }
@media (max-width: 900px) { .ck-heads { grid-template-columns: 1fr 1fr; } .ck-tiles { grid-template-columns: 1fr; } .ck-tls { grid-template-columns: 1fr; } .ck-tls::before { display: none; } .ck-node { flex-direction: row; justify-content: space-between; padding: 6px 12px; } }
.ck-tile { align-items: stretch; }
.ck-tile .chk-note { flex: none; align-self: stretch; width: auto; margin: 0 12px 10px; }
.ph-sub { display: block; font-size: 11px; font-weight: normal; color: var(--muted); margin-top: 1px; white-space: normal; }
.sn-step span { white-space: normal; }
.wiz-step + .wiz-step:not([hidden]) { margin-top: 0; }

/* Contractor evaluation: two cards side by side on wide screens */
@media (min-width: 1100px) {
  #ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
  #ratings .rt-card { margin: 0; }
  #ratings > .empty { grid-column: 1 / -1; }
  #ratings .rt-row { grid-template-columns: minmax(140px, 1fr) auto 70px; }
}

/* Routine tasks: small role cards in one row */
.ck-heads.ck-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ck-heads.ck-tiles .ck-rb { padding: 7px 10px; gap: 4px; border-radius: 10px; }
.ck-heads.ck-tiles .ck-rn { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-heads.ck-tiles .ck-stack { height: 5px; }
.ck-heads.ck-tiles small { font-size: 11px; white-space: nowrap; }
@media (max-width: 900px) { .ck-heads.ck-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ck-heads.ck-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Wide screens: repeated report rows two per row (equipment 3) instead of empty space */
@media (min-width: 1100px) {
  #labor, #items, #inspections, #materials, #waste, #requests, #obstacles, #visitors, #equipment {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  #equipment { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #labor > .rrow, #items > .rrow, #inspections > .rrow, #materials > .rrow, #waste > .rrow,
  #requests > .rrow, #obstacles > .rrow, #visitors > .rrow, #equipment > .rrow { margin: 0; }
  #punch .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  #punch .list > .pl-card { margin: 0; }
}

/* Side menu taller than the screen (e.g. report writing) gets its own scrollbar */
@media (min-width: 1100px) {
  .sidenav { max-height: calc(100vh - 108px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(124,196,255,.45) transparent; }
  .sidenav::-webkit-scrollbar { width: 6px; }
  .sidenav::-webkit-scrollbar-thumb { background: rgba(124,196,255,.45); border-radius: 6px; }
  .sidenav::-webkit-scrollbar-track { background: transparent; }
  .sidenav > * { flex: none; }
}

/* Contractor absent today */
.lab-abs { display: inline-flex; align-items: center; gap: 8px; margin: -2px 0 8px; font-size: 13px; color: #ffcfc4; cursor: pointer; }
.lab-abs input { width: auto; margin: 0; }
.rrow.absent { border-color: rgba(255,120,100,.45); background: rgba(255,120,100,.06); }
.rrow.absent .field:not(:first-child) { opacity: .55; }

/* Project notes log */
.lg-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lg-type { cursor: pointer; position: relative; } .lg-type input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; inset: 0; }
.lg-type span { display: inline-block; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); }
.lg-type input:checked + span { background: rgba(60,140,255,.3); border-color: rgba(120,180,255,.85); font-weight: bold; }
.lg-type input:focus-visible + span { outline: 2px solid #7cc4ff; }
#lgAdd > form { margin: 0; }
.lg-tl { position: relative; padding-inline-start: 4px; }
.lg-month { margin: 14px 0 8px; font-weight: bold; color: #cfe0ff; font-size: 14px; }
.lg-item { display: grid; grid-template-columns: 40px 1fr; gap: 10px; position: relative; margin-bottom: 10px; }
.lg-item::before { content: ""; position: absolute; inset-inline-start: 19px; top: 40px; bottom: -12px; width: 2px; background: rgba(255,255,255,.12); }
.lg-dot { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); z-index: 1; }
.lg-item.lg-ok .lg-dot { border-color: var(--b-ok); } .lg-item.lg-bad .lg-dot { border-color: #ff8a73; } .lg-item.lg-warn .lg-dot { border-color: #f0c53d; } .lg-item.lg-info .lg-dot { border-color: #7cc4ff; }
.lg-card { padding: 10px 14px; margin: 0; }
.lg-item.lg-bad .lg-card { border-color: rgba(255,120,100,.45) !important; }
.lg-h b { font-size: 15px; } .lg-h span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.lg-meta { margin-top: 6px; font-size: 13px; } .lg-d { margin: 6px 0 0; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.lg-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .lg-f small { color: var(--muted); }

/* More visible side menu scrollbar */
@media (min-width: 1100px) {
  .sidenav { scrollbar-width: auto; scrollbar-color: rgba(124,196,255,.75) rgba(255,255,255,.06); scrollbar-gutter: stable; }
  .sidenav::-webkit-scrollbar { width: 9px; }
  .sidenav::-webkit-scrollbar-track { background: rgba(255,255,255,.06); border-radius: 8px; margin: 10px 0; }
  .sidenav::-webkit-scrollbar-thumb { background: rgba(124,196,255,.75); border-radius: 8px; border: 2px solid rgba(8,24,52,.9); }
  .sidenav::-webkit-scrollbar-thumb:hover { background: #7cc4ff; }
}

/* Home: two cards per row */
.menu.home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1040px; margin: 0 auto; gap: 14px; }
.menu.home-grid .menu-card { padding: 16px 18px; min-height: 96px; }
.menu.home-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 7px); justify-self: center; }
/* Large screens: 3 cards per row, incomplete last row centered */
@media (min-width: 1100px) {
  .menu.home-grid { display: flex; flex-wrap: wrap; justify-content: center; max-width: 1240px; }
  .menu.home-grid > * { flex: 0 0 calc((100% - 28px) / 3); min-width: 0; }
  .menu.home-grid > :last-child:nth-child(odd) { width: auto; }
  .pj-strip { max-width: 1240px; }
}
/* Wide screens: 4 cards per row */
@media (min-width: 1200px) {
  .menu.home-grid { max-width: 1480px; }
  .menu.home-grid > * { flex: 0 0 calc((100% - 54px) / 4); }
  .menu.home-grid { gap: clamp(10px, 1.9vh, 18px) 18px; }
  .menu.home-grid .menu-card { padding: clamp(10px, 2vh, 18px) 22px; gap: 16px; min-height: clamp(72px, 11.5vh, 100px); }
  .menu.home-grid .menu-card .icon-box { width: 78px; height: 62px; transform: none; }
  .menu.home-grid .menu-card .text { transform: none; }
  .menu.home-grid .menu-card .icon-box img { max-width: 68px; max-height: 46px; }
  .menu.home-grid .menu-card .text b, .menu.home-grid .menu-card .text > span { white-space: normal; overflow: visible; }
  .pj-strip { max-width: 1480px; }
}
/* Home: welcome message in the top bar */
@media (min-width: 900px) {
  body.home .topbar .page-head.in-bar { margin-top: 0; }
  body.home #content { margin-top: auto; }
}
@media (max-width: 760px) {
  .menu.home-grid { grid-template-columns: 1fr; max-width: 560px; }
  .menu.home-grid > :last-child:nth-child(odd) { width: auto; justify-self: stretch; }
}
/* Home: welcome and cards centered */
@media (min-width: 761px) {
  body.home .page { display: flex; flex-direction: column; min-height: 100vh; }
  body.home .page-head { margin-top: auto; }
  body.home #content { margin-bottom: auto; width: 100%; }
}
.ub-name { font-weight: bold; color: #e8f1ff; }
@media (max-width: 700px) { #userBar .ub-name + span { display: none; } }

/* Weekly report inside the site (A4 sheet in a frame) */
.wk-frame { display: block; width: 100%; min-height: 900px; border: 0; border-radius: 12px; background: transparent; }

/* Page title inside the top bar + horizontal number cards (saves space) */
@media (min-width: 900px) {
  body.nb .topbar .page-head.in-bar {
    display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; justify-content: center;
    margin: 0 auto; text-align: right; background: none; border: 0; padding: 0; min-width: 0;
  }
  body.nb .topbar .page-head.in-bar img { grid-row: 1 / 3; height: 40px; max-width: 110px; margin: 0; padding: 4px 8px; border-radius: 10px; }
  body.nb .topbar .page-head.in-bar h1 { margin: 0; font-size: 18px; line-height: 1.3; white-space: nowrap; }
  body.nb .topbar .page-head.in-bar p { margin: 0; font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
  body.nb .topbar .page-head.in-bar ~ #userBar { margin-inline-start: 0; }
}
@media (min-width: 700px) {
  body.has-nav .stats .stat, body.has-nav .stat.kpi {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; text-align: right; padding: 8px 12px;
    min-height: 48px;
  }
  body.has-nav .stats .stat > span, body.has-nav .stat.kpi > span { grid-column: 1; min-height: 0; }
  body.has-nav .stats .stat > b, body.has-nav .stat.kpi > b { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 22px; align-self: center; }
  body.has-nav .stats .stat > small, body.has-nav .stat.kpi > small { grid-column: 1; margin: 0; }
}

/* Systems: daily report lists */
.ls-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.ls-scope { margin: 0; min-width: 260px; }
.ls-row { display: grid; grid-template-columns: 28px 1fr auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.ls-row input { margin: 0; }
.ls-row.fixed { grid-template-columns: 28px 1fr auto; padding: 8px 0; color: var(--muted); }
.ls-row.fixed em { font-style: normal; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.1); }
.ls-n { text-align: center; color: var(--muted); font-size: 13px; }
.ls-btn { width: var(--b-ic-sm); height: var(--b-ic-sm); border-radius: var(--b-r-sm); border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); cursor: pointer; font-size: 12px; }
.ls-btn:hover:not(:disabled) { background: var(--b-hover-bg); }
.ls-btn:disabled { opacity: .3; cursor: default; }
.ls-btn.del:hover { background: var(--b-bad-bg); border-color: var(--b-bad); }
.ls-add { display: flex; gap: 8px; margin-top: 10px; }
.ls-add input { flex: 1; margin: 0; }
@media (min-width: 1100px) { #rows { columns: 2; column-gap: 18px; } #rows .ls-row { break-inside: avoid; } }

/* Contractor rating labels (poor / average / good / excellent) */
.rt-row:has(.rt-w), #ratings .rt-row:has(.rt-w) { grid-template-columns: minmax(150px, 220px) 1fr; }
.rt-stars:has(.rt-w) { display: flex; gap: 6px; flex-wrap: nowrap; direction: rtl; }
.rt-b.rt-w { width: auto; min-width: 70px; padding: 0 12px; height: 34px; font-size: 13px; flex: 0 1 auto; }
.rt-b.rt-w.on.bad  { background: var(--b-d2); border-color: var(--b-bad); color: #fff; }
.rt-b.rt-w.on.mid  { background: var(--b-w2); border-color: var(--b-warn); color: #fff; }
.rt-b.rt-w.on.good { background: var(--b-g2); border-color: var(--b-ok); color: #fff; }
.rt-b.rt-w.on.exc  { background: var(--b-g2); border-color: var(--b-ok); color: #fff; }
@media (max-width: 700px) {
  .rt-row:has(.rt-w), #ratings .rt-row:has(.rt-w) { grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
  .rt-stars:has(.rt-w) { flex-wrap: nowrap; width: 100%; }
  .rt-b.rt-w { flex: 1 1 0; min-width: 0; width: auto; height: 38px; padding: 0 4px; }
}

/* Systems pages: hidden until admin permission is confirmed (non-admins are redirected home without seeing anything) */
html[data-guard] body { visibility: hidden; }

.report-row .del-link { display: inline-block; margin-top: 8px; margin-inline-start: 18px; font-size: 13px; font-weight: bold; color: #ff8a80; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.report-row .del-link:hover { text-decoration: underline; }

/* Merged contractor card: executed work part */
.rrow .lab-work { margin-top: 4px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.16); }
.rrow.absent .lab-work { opacity: .45; }

/* Systems: reports management */
.ra-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ra-filters .field { margin: 0; min-width: 200px; }
.ra-filters .seg button { padding: 9px 14px; }
.ra-filters .seg button.on { background: var(--b-sel-bg); }
.ra-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ra-all { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: bold; }
.ra-all input, .ra-table input[type=checkbox] { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.ra-table tr.sel td { background: rgba(229,57,53,.12); }
.ra-table td:first-child { width: 36px; text-align: center; }
.ra-act { white-space: nowrap; }
.ra-act .link-btn { margin-inline: 6px; font-size: 13px; text-decoration: none; }
.table-wrap { overflow-x: auto; }
.ra-p[hidden] { display: none !important; } .ra-bar .btn.danger:disabled { opacity: .45; cursor: default; }

/* Daily reports log: edit / view / print / delete buttons */
.report-row .rr-info { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.report-row .rr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.report-row .rr-b { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: bold; cursor: pointer; text-decoration: none;
  color: #e6efff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.22); }
.report-row .rr-b:hover { background: rgba(255,255,255,.16); }
.report-row .rr-b.edit-link { margin: 0; color: #fff; background: rgba(60,140,255,.35); border-color: rgba(140,190,255,.6); }
.report-row .rr-b.del { margin: 0; color: #ffb4b4; background: rgba(229,57,53,.14); border-color: rgba(255,150,150,.45); }
.report-row .rr-b.del:hover { background: rgba(229,57,53,.3); }

/* DESIGN SYSTEM v2. Same identity (navy + glass + city background), unified only: one function per color, font scale, 4/8/12/16/24 spacing, calculated effects. To revert: remove class page-v2 from the page or delete this section. */
body.page-v2 {
  /* Colors: one function each */
  --ds-primary: #3fa9f5;          /* Buttons / selected / active */
  --ds-primary-strong: #1e5aa8;
  --ds-success: #a5d6a7;          /* Done / approved */
  --ds-warning: #ffd54f;          /* Warning only */
  --ds-danger: #ffb4b4;           /* Error / rejected / delete */
  --ds-text: #ffffff;
  --ds-text-2: #cbd5e1;           /* Secondary text */
  --ds-text-3: #94a3b8;           /* Small meta data */
  /* Font scale */
  --ds-page-title: 20px;
  --ds-section-title: 16px;
  --ds-card-title: 15px;
  --ds-body: 14px;
  --ds-secondary: 13px;
  --ds-small: 12px;
  --ds-number: 22px;              /* Indicator card numbers */
  /* Spacing */
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 24px;
  /* Borders and depth */
  --ds-radius-lg: 14px;
  --ds-radius-md: 10px;
  --ds-radius-sm: 6px;
  --ds-border: rgba(255, 255, 255, 0.16);
  --ds-surface-row: rgba(255, 255, 255, 0.04);
  --ds-surface-row-hover: rgba(255, 255, 255, 0.08);
  font-size: var(--ds-body);
}

/* Font */
body.page-v2 .page-head h1 { font-size: var(--ds-page-title); font-weight: 700; }
body.page-v2 .page-head p { font-size: var(--ds-secondary); color: var(--ds-text-2); }

body.page-v2 .page-head { margin-bottom: var(--ds-space-3); }
body.page-v2 p.subtitle { margin-bottom: var(--ds-space-4); }
body.page-v2 .panel-title, body.page-v2 .it-hello h2 { font-size: var(--ds-section-title); font-weight: 700; margin: 0 0 var(--ds-space-2); line-height: 1.4; }
body.page-v2 .it-hello p, body.page-v2 .hint { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .it-row .main b, body.page-v2 .row .main b, body.page-v2 .menu-card .text b { font-size: var(--ds-card-title); font-weight: 600; }
body.page-v2 .it-row .main span, body.page-v2 .row .main > span, body.page-v2 .menu-card .text > span { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .stat span { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .stat b { font-size: var(--ds-number); font-weight: 700; }
body.page-v2 .stat small, body.page-v2 .stat.kpi small { font-size: var(--ds-small); color: var(--ds-text-3); }
body.page-v2 .btn { font-size: 15px; font-weight: 700; }
body.page-v2 .empty, body.page-v2 .empty.small { font-size: var(--ds-secondary); color: var(--ds-text-3); padding: var(--ds-space-5); }

/* Spacing */
body.page-v2 .panel { padding: var(--ds-space-4); margin-bottom: var(--ds-space-3); }
body.page-v2 .it-hello { padding: var(--ds-space-3) var(--ds-space-4); gap: var(--ds-space-3); }
body.page-v2 .it-hello h2 { margin-bottom: var(--ds-space-1); }
body.page-v2 .stats { gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
body.page-v2 .stat { padding: var(--ds-space-2) var(--ds-space-3); }
body.page-v2 .vz-grid2 { gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
body.page-v2 .it-row { padding: var(--ds-space-2) var(--ds-space-3); margin-bottom: var(--ds-space-2); gap: var(--ds-space-3); }
body.page-v2 .it-row .main { gap: var(--ds-space-1); }
body.page-v2 .it-act { gap: var(--ds-space-2); }
body.page-v2 .ap-returned { padding: var(--ds-space-3) var(--ds-space-4); margin-bottom: var(--ds-space-3); }

/* One function per color */
/* Rows: one light surface; state shown by a side line in the state color (not the whole border) */
body.page-v2 .it-row { background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); border-inline-start: 3px solid var(--ds-text-3); }
body.page-v2 .it-row.ok { border-inline-start-color: var(--ds-success); border-color: var(--ds-border); }
body.page-v2 .it-row:has(.it-dot.bad) { border-inline-start-color: var(--ds-warning); }
body.page-v2 .it-row.clickable:hover { background: var(--ds-surface-row-hover); }
body.page-v2 .it-dot.ok { background: var(--ds-success); }
body.page-v2 .it-dot.bad { background: var(--ds-warning); }
/* "Editable" = success state => green badge instead of loose green text */
body.page-v2 em.st-green, body.page-v2 span.st-green {
  font-style: normal; display: inline-block; padding: 0 var(--ds-space-2); border-radius: var(--ds-radius-sm); font-size: var(--ds-small); line-height: 1.7;
  color: var(--ds-success); background: rgba(165, 214, 167, 0.12); border: 1px solid rgba(165, 214, 167, 0.35);
}
/* Report returned by manager = danger (red) in a clear container */
body.page-v2 .ap-returned { border-radius: var(--ds-radius-md); border: 1px solid rgba(255, 180, 180, 0.45); background: rgba(255, 120, 100, 0.10); font-size: var(--ds-secondary); }
body.page-v2 .ap-returned b { color: var(--ds-danger); }
body.page-v2 .ap-returned a { color: var(--ds-primary); }
/* Buttons: blue for the primary action, calm secondary *//* Approval badges: same language *//* Effects: calculated */
/* Indicator cards (dashboard): slight lift on hover only; lists and rows have no motion */
body.page-v2 .stat { transition: transform .15s ease, border-color .15s ease; }
body.page-v2 .stat:hover { transform: translateY(-2px); border-color: rgba(63, 169, 245, 0.45); }
body.page-v2 .it-row, body.page-v2 .it-row:hover { transform: none; box-shadow: none; }
body.page-v2 .panel, body.page-v2 .glass { text-shadow: none; }

/* v2: user menu */
body.page-v2 #userBar { gap: var(--ds-space-2); }
body.page-v2 .um { position: relative; }
body.page-v2 .um-btn {
  display: inline-flex; align-items: center; gap: var(--ds-space-2); height: 36px; padding: 0 var(--ds-space-3) 0 var(--ds-space-2);
  font: inherit; font-size: var(--ds-secondary); font-weight: 600; color: var(--b-neutral-ink); cursor: pointer;
  background: var(--b-neutral-bg); border: 1px solid var(--b-neutral-bd); border-radius: 999px;
}
body.page-v2 .um-btn:hover, body.page-v2 .um-btn[aria-expanded=true] { background: rgba(63, 169, 245, 0.14); border-color: rgba(63, 169, 245, 0.55); }
body.page-v2 .um-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: var(--ds-small); font-weight: 700; background: linear-gradient(135deg, var(--ds-primary-strong), var(--ds-primary)); }
body.page-v2 .um-caret { font-size: 10px; color: var(--ds-text-2); }
body.page-v2 .um-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 240px; z-index: 60; padding: var(--ds-space-2);
  background: rgba(10, 26, 54, 0.97); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}
body.page-v2 .um-menu[hidden] { display: none; }
body.page-v2 .um-head { display: flex; flex-direction: column; gap: 2px; padding: var(--ds-space-2) var(--ds-space-3) var(--ds-space-3); border-bottom: 1px solid var(--ds-border); margin-bottom: var(--ds-space-2); }
body.page-v2 .um-head b { font-size: var(--ds-body); }
body.page-v2 .um-head span { font-size: var(--ds-small); color: var(--ds-text-3); text-align: right; }
body.page-v2 .um-item { display: block; width: 100%; text-align: start; padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-sm); font: inherit; font-size: var(--ds-secondary); background: none; border: 0; cursor: pointer; color: var(--ds-text); }
body.page-v2 .um-item.danger { color: var(--ds-danger); }
body.page-v2 .um-item:hover { background: rgba(255, 255, 255, 0.07); }

/* v2: badges + pencil icon + manager note */body.page-v2 .it-edit {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-start: var(--ds-space-1); vertical-align: middle;
  font-style: normal; font-size: 12px; color: var(--ds-success); border: 1px solid rgba(165, 214, 167, 0.4); border-radius: 50%; cursor: help;
}
body.page-v2 .it-note { display: block; font-size: var(--ds-small); color: var(--ds-text-3); }

/* v2: transparent secondary button (ghost) *//* v2: open page in the side menu */
body.page-v2 .sidenav a.on {
  background: linear-gradient(90deg, rgba(63, 169, 245, 0.42), rgba(63, 169, 245, 0.20)); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(63, 169, 245, 0.55);
}
body.page-v2 .sidenav a.on svg { color: #fff; opacity: 1; }
body.page-v2 .sidenav a.on::before { inset-inline-start: -10px; width: 4px; inset-block: 6px; background: var(--ds-primary); box-shadow: 0 0 10px rgba(63, 169, 245, 0.9); }

/* v2: daily reports log */
body.page-v2 h1.title { font-size: var(--ds-page-title); font-weight: 700; margin-bottom: var(--ds-space-1); }
body.page-v2 .subtitle { font-size: var(--ds-secondary); color: var(--ds-text-2); margin-bottom: var(--ds-space-3); }
body.page-v2 .toolbar { gap: var(--ds-space-2); margin-bottom: var(--ds-space-3); }
body.page-v2 .list { gap: var(--ds-space-2); }
body.page-v2 .report-row { padding: var(--ds-space-3) var(--ds-space-4); border-radius: var(--ds-radius-md) !important; border-inline-start: 3px solid var(--ds-text-3) !important; }
body.page-v2 .report-row:has(.ap-ok) { border-inline-start-color: var(--ds-success) !important; }
body.page-v2 .report-row:has(.ap-pending) { border-inline-start-color: var(--ds-warning) !important; }
body.page-v2 .report-row:has(.ap-bad) { border-inline-start-color: var(--ds-danger) !important; }
body.page-v2 .report-row .main { display: flex; flex-direction: column; gap: var(--ds-space-1); }
body.page-v2 .report-row .rr-info { margin-top: 0; font-size: var(--ds-small); color: var(--ds-text-3); }
body.page-v2 .report-row .rr-acts { gap: var(--ds-space-2); margin-top: var(--ds-space-2); }
body.page-v2 .report-row .rr-b { height: 30px; padding: 0 var(--ds-space-3); border-radius: var(--ds-radius-sm); font-size: var(--ds-secondary); font-weight: 600; }
/* Primary action blue, others transparent with a thin border, delete red transparent */
body.page-v2 .report-row .rr-b.edit-link { background: linear-gradient(90deg, var(--ds-primary-strong), var(--ds-primary)); border-color: transparent; color: #fff; }
body.page-v2 .report-row .rr-b.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.28); color: var(--ds-text-2); }
body.page-v2 .report-row .rr-b.ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(63, 169, 245, 0.6); color: var(--ds-text); }
body.page-v2 .report-row .rr-b.del { background: transparent; border: 1px solid rgba(255, 180, 180, 0.45); color: var(--ds-danger); }
body.page-v2 .report-row .rr-b.del:hover { background: rgba(255, 120, 100, 0.12); }
body.page-v2 .report-row .rr-info .st-yellow { color: var(--ds-text-3); }
body.page-v2 #btnMore { margin-top: var(--ds-space-3); }
/* Delete: calm by default, clearly red on hover (sensitive action) */
body.page-v2 .report-row .rr-b.del { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
body.page-v2 .report-row .rr-b.del:hover, body.page-v2 .report-row .rr-b.del:focus-visible {
  background: rgba(239, 68, 68, 0.22); border-color: rgba(248, 113, 113, 0.9); color: #fff; box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); outline: none; text-decoration: none;
}

/* v2: planning and control (planning.html) */
/* One color per function: orange merges with yellow (warning) */
body.page-v2 .st-orange { color: var(--ds-warning); }
/* Section titles white; yellow for warnings only */
body.page-v2 .sec .t b { font-size: var(--ds-section-title); color: var(--ds-text); }
body.page-v2 .sec .t span, body.page-v2 .la-banner .t span { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .la-banner .t b { font-size: var(--ds-section-title); }
body.page-v2 .section-title { font-size: var(--ds-section-title); font-weight: 700; color: var(--ds-text); margin: var(--ds-space-5) var(--ds-space-1) var(--ds-space-3); }
body.page-v2 .section-title span { font-size: var(--ds-small); font-weight: 400; color: var(--ds-text-2); text-shadow: 0 1px 4px rgba(0,0,0,.9); }
/* Today strip: zero is calm (gray), a number needing attention is yellow */
body.page-v2 .today-strip { gap: var(--ds-space-2); margin-bottom: var(--ds-space-3); }
body.page-v2 .today-strip .ts-l { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ts-c { padding: var(--ds-space-2) var(--ds-space-3); border-radius: var(--ds-radius-md); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ts-c b { font-size: var(--ds-card-title); }
body.page-v2 .ts-c.ok b { color: var(--ds-text-3); }
body.page-v2 .ts-c.bad { border-color: rgba(255, 213, 79, 0.5); background: rgba(255, 213, 79, 0.08); color: var(--ds-text); }
body.page-v2 .ts-c.bad b { color: var(--ds-warning); }
body.page-v2 .ts-c:hover { border-color: rgba(63, 169, 245, 0.6); }
/* Project cards: name 15 and percent 22 */
body.page-v2 .pc-head b { font-size: var(--ds-card-title); }
body.page-v2 .pc-head .pct { font-size: var(--ds-number); color: var(--ds-primary); }
body.page-v2 .pc-sub, body.page-v2 .pc-foot { font-size: var(--ds-small); }
body.page-v2 .pcard .chip { font-size: var(--ds-small); }
/* Data completeness */
body.page-v2 .dq-h { font-size: var(--ds-secondary); }
body.page-v2 .dq small { font-size: var(--ds-small); color: var(--ds-text-3); }

/* v2: general rules for all pages */
/* Tables: no motion, header secondary 13, cells 14 */
body.page-v2 .table { font-size: var(--ds-body); }
body.page-v2 .table th { font-size: var(--ds-secondary); color: var(--ds-text-2); font-weight: 600; padding: var(--ds-space-2); border-bottom-color: var(--ds-border); }
body.page-v2 .table td { padding: var(--ds-space-2); border-bottom-color: rgba(255, 255, 255, 0.07); }
body.page-v2 .table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
body.page-v2 .table td span.st-green { display: inline; padding: 0; border: 0; background: none; font-size: inherit; }
/* Forms: title 13 secondary, field 14 */
body.page-v2 .field label { font-size: var(--ds-secondary); color: var(--ds-text-2); margin-bottom: var(--ds-space-1); }
body.page-v2 .field input, body.page-v2 .field select, body.page-v2 .field textarea { font-size: var(--ds-body); border-radius: var(--ds-radius-sm); }
body.page-v2 .field input:focus, body.page-v2 .field select:focus, body.page-v2 .field textarea:focus { border-color: var(--ds-primary); box-shadow: 0 0 0 3px rgba(63, 169, 245, 0.18); outline: none; }
/* Tabs: selected blue, no lift *//* Badges *//* Menu cards and sections: slight lift only */
body.page-v2 .menu-card:hover { transform: translateY(-2px); }
/* Delete buttons on any page: calm, clearly red on hover *//* Decorative yellow titles become white; yellow is for warnings only */
body.page-v2 .breadcrumb, body.page-v2 .modal h3, body.page-v2 .period-label, body.page-v2 .summary h3, body.page-v2 .rrow-head b, body.page-v2 .plan-head h2 { color: var(--ds-text); }
body.page-v2 .rrow-head b, body.page-v2 .modal h3, body.page-v2 .summary h3 { font-size: var(--ds-card-title); }
body.page-v2 .plan-head h2 { font-size: var(--ds-section-title); }

/* v2: user management (users.html) */
body.page-v2 .us-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
body.page-v2 .us-filters { margin: 0; }
body.page-v2 .us-tools { display: flex; gap: var(--ds-space-2); align-items: center; }
body.page-v2 .us-tools input { width: 240px; height: 32px; padding: 0 var(--ds-space-3); border-radius: var(--ds-radius-sm); font-size: var(--ds-secondary); }
body.page-v2 .us-list { display: flex; flex-direction: column; gap: var(--ds-space-2); margin-bottom: var(--ds-space-3); }
body.page-v2 .us-row {
  display: grid; grid-template-columns: 36px minmax(220px, 1.2fr) auto minmax(200px, 2fr) auto; align-items: center; gap: var(--ds-space-3);
  width: 100%; text-align: right; font: inherit; color: var(--ds-text); cursor: pointer;
  padding: var(--ds-space-2) var(--ds-space-3); background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-success); border-radius: var(--ds-radius-md);
}
body.page-v2 .us-row:hover { background: var(--ds-surface-row-hover); border-color: rgba(63, 169, 245, 0.5); }
body.page-v2 .us-row.stale { border-inline-start-color: var(--ds-warning); }
body.page-v2 .us-av { width: 32px; height: 32px; font-size: var(--ds-card-title); }
body.page-v2 .us-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.page-v2 .us-main b { font-size: var(--ds-card-title); font-weight: 600; }
body.page-v2 .us-main small { font-size: var(--ds-small); color: var(--ds-text-3); text-align: right; overflow: hidden; text-overflow: ellipsis; }
body.page-v2 .us-noname { color: var(--ds-warning); font-weight: 600; }
body.page-v2 .us-roles, body.page-v2 .us-projs, body.page-v2 .us-dlg-roles { display: flex; flex-wrap: wrap; gap: var(--ds-space-1); align-items: center; }
body.page-v2 .us-projs i, body.page-v2 .us-roles i { font-style: normal; }
body.page-v2 .us-projs .muted { font-size: var(--ds-small); }
body.page-v2 .us-role { font-style: normal; font-size: var(--ds-small); padding: 1px var(--ds-space-2); border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-border); color: var(--ds-text-2); white-space: nowrap; }
body.page-v2 .us-role.r-admin, body.page-v2 .us-role.r-manager { color: #cfe8ff; border-color: rgba(63, 169, 245, 0.55); background: rgba(63, 169, 245, 0.14); }
body.page-v2 .us-role.r-hr, body.page-v2 .us-role.r-followup, body.page-v2 .us-role.r-planning, body.page-v2 .us-role.r-basma, body.page-v2 .us-role.r-ohda, body.page-v2 .us-role.r-ohrep { color: #e3d4ff; border-color: rgba(180, 150, 255, 0.5); background: rgba(150, 120, 255, 0.12); }
body.page-v2 .us-act { font-size: var(--ds-small); color: var(--ds-text-2); }
body.page-v2 .us-edit { font-size: var(--ds-secondary); color: var(--b-info); border: 1px solid var(--b-info-bd); border-radius: 10px; padding: 7px 14px; white-space: nowrap; }
body.page-v2 .us-row:hover .us-edit { border-color: var(--ds-primary); color: var(--ds-text); }
body.page-v2 .us-dlg-roles { margin-bottom: var(--ds-space-3); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .us-ph { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-space-2); margin-bottom: var(--ds-space-2); flex-wrap: wrap; }
body.page-v2 .us-ph span { display: flex; gap: var(--ds-space-1); }
@media (max-width: 900px) {
  body.page-v2 .us-row { grid-template-columns: 36px 1fr auto; }

body.page-v2 .panel:has(.table):has(th:nth-child(4)) { overflow-x: auto; }
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .table { min-width: 560px; }
  body.page-v2 [style*="overflow-x"] .table:has(th:nth-child(4)) { min-width: 560px; }
  body.page-v2 .us-roles { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  body.page-v2 .us-projs { grid-column: 2 / span 2; }
  body.page-v2 .us-edit { display: none; }
  body.page-v2 .us-tools { width: 100%; } body.page-v2 .us-tools input { flex: 1; width: auto; }
}

/* v2: systems dashboard (admin.html) */
body.page-v2 .ad-grid { align-items: start; }
body.page-v2 .ad-grid .panel { margin-bottom: 0; }
body.page-v2 .ad-chk { border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-success); border-radius: var(--ds-radius-md); background: var(--ds-surface-row); margin-bottom: var(--ds-space-2); }
body.page-v2 .ad-chk.warn { border-inline-start-color: var(--ds-warning); }
body.page-v2 .ad-chk.bad { border-inline-start-color: var(--ds-danger); }
body.page-v2 .ad-chk > summary { list-style: none; display: flex; align-items: center; gap: var(--ds-space-2); padding: var(--ds-space-2) var(--ds-space-3); font-size: var(--ds-body); }
body.page-v2 .ad-chk > summary::-webkit-details-marker { display: none; }
body.page-v2 .ad-chk:not(.ok) > summary { cursor: pointer; }
body.page-v2 .ad-chk > summary i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: var(--ds-small); font-weight: 700; color: #0b1a33; background: var(--ds-success); flex: none; }
body.page-v2 .ad-chk.warn > summary i { background: var(--ds-warning); }
body.page-v2 .ad-chk.bad > summary i { background: var(--ds-danger); }
body.page-v2 .ad-chk > summary span { flex: 1; }
body.page-v2 .ad-chk > summary b { font-size: var(--ds-secondary); color: var(--ds-text-2); font-weight: 600; }
body.page-v2 .ad-chk.warn > summary b { color: var(--ds-warning); } body.page-v2 .ad-chk.bad > summary b { color: var(--ds-danger); }
body.page-v2 .ad-chk .hint, body.page-v2 .ad-chk ul { margin: 0 var(--ds-space-3) var(--ds-space-2); }
body.page-v2 .ad-chk ul { padding-inline-start: var(--ds-space-4); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ad-set { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-2) 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
body.page-v2 .ad-set > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.page-v2 .ad-set b { font-size: var(--ds-body); font-weight: 600; }
body.page-v2 .ad-set small { font-size: var(--ds-small); color: var(--ds-text-3); }
body.page-v2 .ad-counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--ds-space-4); }
body.page-v2 .ad-counts > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ad-counts b { color: var(--ds-text); font-weight: 600; }
body.page-v2 a.btn.ghost { text-decoration: none; }
/* Confirmation dialog for the routine tasks review before sending the report */
body.page-v2 .chk-confirm { list-style: none; margin: var(--ds-space-2) 0; padding: 0; display: flex; flex-direction: column; gap: var(--ds-space-1); font-size: var(--ds-secondary); }
body.page-v2 .chk-confirm li { padding: 6px var(--ds-space-3); border-radius: var(--ds-radius-sm); background: var(--ds-surface-row); border: 1px solid var(--ds-border); }

/* v2: items table (manage.html) */
body.page-v2 .it-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-space-3); flex-wrap: wrap; margin-bottom: var(--ds-space-2); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .it-bar-a { display: flex; gap: var(--ds-space-2); }
body.page-v2 .it-wrap { overflow-x: auto; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: rgba(10, 24, 54, 0.88); backdrop-filter: blur(8px); }
body.page-v2 .it-table { min-width: 1110px; }
body.page-v2 .it-table th { white-space: nowrap; background: rgba(255, 255, 255, 0.04); }
body.page-v2 .it-table td { padding: 4px; border-bottom-color: rgba(255, 255, 255, 0.06); }
body.page-v2 .it-table td.n, body.page-v2 .it-table th.n { width: 36px; color: var(--ds-text-3); font-size: var(--ds-small); }
body.page-v2 .it-table tr.dirty td:first-child { box-shadow: inset -3px 0 0 var(--ds-primary); }
body.page-v2 .it-table input { width: 100%; height: 32px; padding: 0 var(--ds-space-2); font-size: var(--ds-secondary); border-radius: var(--ds-radius-sm); background: rgba(0, 0, 0, 0.18); border: 1px solid transparent; color: var(--ds-text); }
body.page-v2 .it-table input:hover { border-color: var(--ds-border); }
body.page-v2 .it-table input:focus { border-color: var(--ds-primary); box-shadow: 0 0 0 3px rgba(63, 169, 245, 0.18); outline: none; }
body.page-v2 .it-table input.invalid { border-color: var(--ds-danger); }
body.page-v2 .it-table .c-code { width: 90px; } body.page-v2 .it-table .c-name { min-width: 240px; } body.page-v2 .it-table .c-unit { width: 80px; }
body.page-v2 .it-table .c-qty, body.page-v2 .it-table .c-weight { width: 105px; } body.page-v2 .it-table .c-pct { width: 135px; } body.page-v2 .it-table .c-start, body.page-v2 .it-table .c-end { width: 150px; }
body.page-v2 .it-table td.none { padding: var(--ds-space-4); text-align: center; }
body.page-v2 .it-del { background: transparent; border: 1px solid transparent; border-radius: var(--ds-radius-sm); color: var(--ds-text-3); cursor: pointer; width: 32px; height: 32px; }
body.page-v2 .it-del:hover { background: var(--b-bad-bg); border-color: var(--b-bad); color: #fff; }
/* Credits lines on the login screen (replaces the old mark in the buildings image) */
.login-foot { position: fixed; left: 0; right: 0; bottom: 10px; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; text-align: center; }
.login-foot b { font-weight: 400; font-size: 14px; letter-spacing: .08em; color: rgba(206, 222, 242, .92); padding-top: 12px; background: linear-gradient(90deg, transparent, rgba(190, 210, 235, .45), transparent) top center / 380px 1px no-repeat; }
.login-foot span { font-size: 12px; font-weight: 400; letter-spacing: .07em; color: rgba(214, 228, 246, .98); }
@media print { .login-foot { display: none; } }
/* Warning: reports not approved by the manager are not counted in statistics */
body.page-v2 .pend-banner { margin: 0 0 var(--ds-space-3); padding: var(--ds-space-2) var(--ds-space-4); border-radius: var(--ds-radius-md); border: 1px solid rgba(255, 213, 79, 0.45); background: rgba(20, 30, 55, 0.85); color: var(--ds-warning); font-size: var(--ds-secondary); }
@media print { .pend-banner { display: none; } }

/* Moving "Our projects" strip on the section picker page */
.pj-strip { max-width: 1040px; margin: var(--ds-space-5) auto 0; }
.pj-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ds-space-3); margin: 0 4px var(--ds-space-2); }
.pj-head h2 { margin: 0; font-size: var(--ds-section-title); font-weight: 700; color: var(--ds-text); }
.pj-head a { font-size: var(--ds-small); color: var(--ds-text-2); text-decoration: none; }
.pj-head a:hover { color: var(--ds-primary); }
.pj-view { overflow: hidden; direction: ltr; border-radius: var(--ds-radius-lg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.pj-track { display: flex; gap: var(--ds-space-3); width: max-content; padding: 4px 0; animation: pj-move var(--pj-dur, 80s) linear infinite; }
.pj-view:hover .pj-track, .pj-view:focus-within .pj-track { animation-play-state: paused; }
@keyframes pj-move { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--ds-space-3) / 2)); } }
.pj-card { position: relative; margin: 0; width: 230px; aspect-ratio: 3 / 2; flex: none; overflow: hidden; direction: rtl;
  border-radius: var(--ds-radius-md); border: 1px solid var(--ds-border); background: rgba(255, 255, 255, 0.04); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }
.pj-card { background: linear-gradient(110deg, rgba(255,255,255,.05) 30%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 70%) 0 0 / 300% 100%; animation: pj-wait 1.6s ease-in-out infinite; }
.pj-card:has(img.ok) { animation: none; background: rgba(255, 255, 255, 0.04); }
@keyframes pj-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
.pj-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: transform .4s ease, opacity .5s ease; }
.pj-card img.ok { opacity: 1; }
.pj-a { display: block; width: 100%; height: 100%; color: inherit; text-decoration: none; cursor: pointer; }
.pj-card:hover img { transform: scale(1.05); }
.pj-card figcaption { position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px; display: flex; flex-direction: column; gap: 2px; text-align: right;
  background: linear-gradient(180deg, transparent, rgba(0, 18, 45, 0.88) 55%); }
.pj-card figcaption b { font-size: var(--ds-secondary); font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-card figcaption span { font-size: var(--ds-small); color: var(--ds-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) { .pj-strip { max-width: 560px; } .pj-card { width: 190px; } }
@media (prefers-reduced-motion: reduce) { .pj-view { overflow-x: auto; } .pj-track, .pj-card { animation: none; } .pj-card[aria-hidden="true"] { display: none; } }
@media print { .pj-strip { display: none; } }

/* Mobile: no section logo beside the title (the horizontal company logo above is enough) */
@media (max-width: 899px) {
  body.nb .page-head > img { display: none; }
}
/* Mobile: smaller horizontal company logo (same as the top bar); login keeps the large logo */
@media (max-width: 899px) {
  :root { --logo-w: min(116px, 34vw); --logo-h: 46px; }   /* مقاس واحد لشعار الشركة في كل الصفحات على الجوال */
  body.nb .brand { margin-bottom: var(--ds-space-3); }
  body.nb .brand img { content: url("../img/company_logo_h.png"); width: 210px; max-width: 64vw; }
  /* Inner screens: the company logo sits in the empty middle of the top bar's first row (between the menu button and "back"), smaller, instead of under the alerts */
}
/* Mobile: short list of section screens under the main board (instead of large cards) */
.sec-links { margin-top: var(--ds-space-5); border-radius: var(--ds-radius-lg); border: 1px solid var(--ds-border); background: rgba(12, 32, 66, 0.72); overflow: hidden; }
.sec-links-t { padding: var(--ds-space-3) var(--ds-space-4); font-size: var(--ds-section-title); font-weight: 700; color: var(--ds-text); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sec-links a { display: flex; align-items: center; gap: var(--ds-space-3); padding: var(--ds-space-3) var(--ds-space-4); color: var(--ds-text); text-decoration: none; font-size: var(--ds-body); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.sec-links a:last-child { border-bottom: 0; }
.sec-links a:hover, .sec-links a:active { background: var(--ds-surface-row-hover); }
.sec-links a svg { color: var(--ds-primary); flex: none; }
.sec-links a span { flex: 1; }
.sec-links a i { font-style: normal; font-size: var(--ds-small); color: var(--ds-text-3); }

/* Weekly/monthly report print: same logo order in all reports; Itqan right, company left */
.ph-logos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; border-bottom: 3px solid #1d3b6e; padding-bottom: 8px; margin-bottom: 10px; }
.ph-logos img { height: 58px; width: auto; } .ph-logos img:first-child { justify-self: start; } .ph-logos img:last-child { justify-self: end; }
.ph-logos b { font-size: 18px; }

/* Footer of aggregated weekly/monthly report print: same credits line as daily and weekly */
.print-tm { margin-top: 10px; padding-top: 5px; border-top: 1px solid #dfe5ee; text-align: center; font-size: 10px; color: #8a97ab; line-height: 1.6; }
.print-tm b { font-size: 12px; font-weight: 700; color: #4a5a72; }

/* Screen title in the top bar: exactly centered, vertically centered on the logo (even without a line below) */
@media (min-width: 900px) {
  body.nb .topbar .page-head.in-bar > h1:last-child { grid-row: 1 / 3; align-self: center; }
}
@media (min-width: 1200px) {
  body.nb .topbar .page-head.in-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
  body.nb .topbar .page-head.in-bar ~ #userBar { margin-inline-start: auto; }
}

/* Systems screens: same layout everywhere. One bar above the content (tabs/count right, tools and buttons left) + cards in a grid */
body.page-v2 .nz-bar .chk-roles { margin: 0; }
body.page-v2 .nz-bar .toolbar .breadcrumb { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .nz-state { font-size: var(--ds-small); color: var(--ds-text-2); white-space: nowrap; }
body.page-v2 .nz-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-2); }
body.page-v2 .nz-grid.nz-g3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } /* (V7.9.4.0) كروت المشاريع بنفس مقاس كروت المستخدمين/المقاولين */
body.page-v2 .nz-grid > .empty { grid-column: 1 / -1; }
body.page-v2 .us-row.nz-card { grid-template-columns: 32px minmax(0, 1fr) auto; min-height: 64px; }
body.page-v2 .nz-card .us-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.page-v2 .nz-card .us-main small { white-space: nowrap; }
/* Project card: name and details on top, buttons below */
body.page-v2 .nz-grid > .row { flex-direction: column; align-items: stretch; justify-content: space-between; gap: var(--ds-space-2);
  background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-primary); border-radius: var(--ds-radius-md); padding: var(--ds-space-3); }
body.page-v2 .nz-grid > .row:hover { background: var(--ds-surface-row-hover); border-color: rgba(63, 169, 245, 0.5); }
body.page-v2 .nz-grid > .row .row-actions { justify-content: flex-end; }
@media (max-width: 1400px) { body.page-v2 .nz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { body.page-v2 .nz-grid, body.page-v2 .nz-grid.nz-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { body.page-v2 .nz-grid, body.page-v2 .nz-grid.nz-g3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { body.page-v2 .nz-card .us-edit { display: none; } }

/* Items table: selection column */
body.page-v2 .it-table td.sel, body.page-v2 .it-table th.sel { width: 34px; text-align: center; }
body.page-v2 .it-table td.sel input, body.page-v2 .it-table th.sel input { width: 17px; height: 17px; accent-color: var(--ds-primary); cursor: pointer; }
body.page-v2 .it-table tr.sel td { background: rgba(239, 68, 68, 0.10); }


/* Backup screen */
body.page-v2 .bk-row .btn { width: auto; flex: none; padding-inline: var(--ds-space-5, 24px); }
body.page-v2 .bk-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); flex-wrap: wrap; }
body.page-v2 .bk-info { display: flex; flex-direction: column; gap: 4px; }
body.page-v2 .bk-info b { font-size: 22px; }
body.page-v2 .bk-info small { font-size: var(--ds-small); color: var(--ds-text-3); }

/* Systems board: clickable list cards */
body.page-v2 a.ad-lnk { text-decoration: none; color: inherit; }
body.page-v2 a.ad-lnk:hover { border-color: rgba(63, 169, 245, 0.6); }
.stats.two { grid-template-columns: repeat(2, 1fr); }

/* Compact info bar */
body.page-v2 .ad-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); padding: 8px var(--ds-space-3); margin-bottom: var(--ds-space-3); font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ad-strip b { font-size: var(--ds-body); color: var(--ds-text); font-weight: 600; margin-inline-end: var(--ds-space-3); }
body.page-v2 .ad-strip b.st-green { color: var(--ds-success); } body.page-v2 .ad-strip b.st-yellow { color: var(--ds-warning); }
body.page-v2 .ad-strip small { font-size: var(--ds-small); color: var(--ds-text-3); }
body.page-v2 .ad-strip .ad-lnk { display: inline-flex; gap: 6px; align-items: center; }
body.page-v2 .ad-strip .ad-lnk b { margin: 0; }
body.page-v2 a.ad-strip { text-decoration: none; color: var(--ds-text); }
body.page-v2 .bk-info b { font-size: var(--ds-body); }

body.page-v2 .us-row.grp { grid-template-columns: 110px minmax(160px, 1fr) 2fr; cursor: default; }
body.page-v2 .us-row.lg { grid-template-columns: 36px minmax(220px, 1.2fr) auto minmax(160px, 1fr); cursor: default; }
body.page-v2 .us-grp { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }
body.page-v2 .us-grp label { flex: none; padding: 6px var(--ds-space-3); }

/* User projects: 3 per row without a long list */
body.page-v2 .checks.us-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-2); max-height: none; overflow: visible; }
body.page-v2 .checks.us-checks label { padding: 6px var(--ds-space-2); gap: var(--ds-space-2); font-size: var(--ds-secondary); min-width: 0; }
body.page-v2 .checks.us-checks label input { flex: none; width: 16px; height: 16px; }
@media (max-width: 560px) { body.page-v2 .checks.us-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v2: unified list screens (lists / checklists / contractors) */
body.page-v2 .ls-body { display: flex; flex-direction: column; gap: var(--ds-space-3); }
body.page-v2 .ls-head { margin: 0; align-items: center; }
body.page-v2 .ls-head .hint { flex: 1; }
body.page-v2 .ls-scope { margin: 0; min-width: 240px; }
body.page-v2 .ls-scope label { display: none; }
body.page-v2 .ls-scope select, body.page-v2 .ck-name input, body.page-v2 .ls-add input, body.page-v2 .ls-row input, body.page-v2 .ck-slot input { height: 32px; padding: 0 var(--ds-space-3); border-radius: var(--ds-radius-sm); font-size: var(--ds-secondary); margin: 0; }
body.page-v2 .ck-name { margin: 0; display: flex; align-items: center; gap: var(--ds-space-2); }
body.page-v2 .ck-name label { margin: 0; white-space: nowrap; font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .ck-name input { width: 280px; }
body.page-v2 .ls-grid, body.page-v2 .ck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-2); columns: auto; }
body.page-v2 .ck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
body.page-v2 .ls-grid > .empty { grid-column: 1 / -1; }
body.page-v2 .ls-row, body.page-v2 .ck-slot { margin: 0; background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); }
body.page-v2 .ls-row { grid-template-columns: 22px minmax(0, 1fr) auto auto auto; gap: var(--ds-space-1); padding: var(--ds-space-2) var(--ds-space-3); }
body.page-v2 .ls-row.fixed { grid-column: 1 / -1; grid-template-columns: 22px 1fr auto; }
body.page-v2 .ls-btn { width: var(--b-ic-sm); height: var(--b-ic-sm); border-radius: var(--b-r-sm); font-size: var(--ds-small); }
body.page-v2 .ck-slot { padding: var(--ds-space-2) var(--ds-space-3); }
body.page-v2 .ck-slot-h { margin-bottom: var(--ds-space-2); gap: var(--ds-space-2); flex-wrap: nowrap; align-items: center; }
body.page-v2 .ck-slot-h label { flex: 1; font-size: var(--ds-small); color: var(--ds-text-3); display: flex; align-items: center; gap: var(--ds-space-2); }
body.page-v2 .ck-slot-h label input { flex: 1; }
body.page-v2 .ck-slot textarea { min-height: 0; font-size: var(--ds-secondary); line-height: 1.7; resize: vertical; }
body.page-v2 .ls-add { margin: 0; }
body.page-v2 .ls-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); flex-wrap: wrap; }
@media (max-width: 1100px) { body.page-v2 .ls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.page-v2 .ck-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { body.page-v2 .ls-grid { grid-template-columns: 1fr; } body.page-v2 .ck-name input { width: 100%; } }


/* Group permissions screen (user management) */
body.page-v2 .pm-wrap { overflow-x: auto; max-width: 860px; margin: 0 auto; padding: 4px 14px 10px; border-radius: var(--ds-radius-sm, 12px); border: 1px solid var(--ds-border); background: rgba(10, 24, 52, .82); backdrop-filter: blur(6px); }
html[data-theme="light"] body.page-v2 .pm-wrap { background: rgba(255, 255, 255, .92); }
body.page-v2 .pm-t { width: 100%; border-collapse: collapse; font-size: var(--ds-body); }
body.page-v2 .pm-t th { font-size: var(--ds-small); color: var(--ds-text-2); text-align: center; padding: 6px 8px; white-space: nowrap; border-bottom: 1px solid var(--ds-border); }
body.page-v2 .pm-t th:first-child, body.page-v2 .pm-t td.pm-n, body.page-v2 .pm-t tr.pm-sec td:first-child { text-align: right; }
body.page-v2 .pm-t td { text-align: center; padding: 5px 8px; border-bottom: 1px solid var(--ds-border); }
body.page-v2 .pm-t td.pm-n { padding-inline-start: 22px; color: var(--ds-text-2); }
body.page-v2 .pm-t tr.pm-sec td { font-weight: 700; background: rgba(120, 160, 220, .10); }
body.page-v2 .pm-t input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
/* User management rows in dark mode: denser background so the background does not bleed through text */
html:not([data-theme="light"]) body.page-v2 .us-row { background: rgba(10, 24, 52, .84); backdrop-filter: blur(4px); }
html:not([data-theme="light"]) body.page-v2 .us-row:hover { background: rgba(22, 48, 92, .9); }
/* "Our projects" to the right of the images (not above) */
@media (min-width: 900px) {
  .pj-strip:not([hidden]) { display: flex; align-items: center; gap: var(--ds-space-4); width: 100%; }
  .pj-strip .pj-head { flex: none; margin: 0; width: 120px; }
  .pj-strip::after { content: ""; flex: none; width: 120px; }   /* Empty space on the left as wide as the title so the images center */
  .pj-strip .pj-view { flex: 1; min-width: 0; }
}

/* English (LTR): directional arrows are flipped */
html[dir="ltr"] .menu-card .arrow, html[dir="ltr"] .sec-links a > i { display: inline-block; transform: scaleX(-1); }
html[dir="ltr"] body.page-v2 .us-row { text-align: left; }
/* "Our projects" strip same width as the cards (centered with them) */
@media (min-width: 1100px) { body.home .pj-strip { max-width: 1240px; } }
@media (min-width: 1200px) { body.home .pj-strip { max-width: 1480px; } }
.login-foot span strong { font-family: "Dancing Script", cursive; font-weight: 600; font-size: 1.2em; line-height: 1; letter-spacing: .02em; vertical-align: -.08em; }
/* Developer name links to their page (works though the footer has pointer-events: none) */
.nb-dev-link { pointer-events: auto; color: inherit; text-decoration: none; cursor: pointer; border-bottom: 1px solid transparent; transition: border-color .15s; }
.nb-dev-link:hover, .nb-dev-link:focus-visible { border-bottom-color: currentColor; }
.nb-dev-link b, .nb-dev-link strong { color: inherit !important; }
/* Home >= 1200px: uniform side margins (28px) for top bar, cards and images so they do not touch the edge */
@media (min-width: 1200px) {
  body.home .page { padding-left: 28px; padding-right: 28px; }
  body.home .topbar { padding-left: 28px; padding-right: 28px; }
}
/* Welcome: "... | project management"; separator and subtitle lighter than the sentence */
.hello-sep { opacity: .45; margin: 0 .35em; font-weight: 300; }
.hello-sub { font-weight: 500; opacity: .85; }

/* Company workers attendance (daily report) + HR sheets */
.att-title { margin: 16px 0 8px; font-size: var(--ds-card-title, 15px); }
.att-empty { padding: 10px 12px; border: 1px dashed var(--ds-border, rgba(255,255,255,.16)); border-radius: 10px; font-size: 13px; opacity: .8; }
.att-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.att-head b { color: var(--ds-success, #a5d6a7); } .att-head small { opacity: .7; font-size: 12px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.att-w { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--ds-border, rgba(255,255,255,.16)); border-radius: 10px; background: var(--ds-surface-row, rgba(255,255,255,.04)); }
.att-w.on { border-color: var(--b-ok-bd); background: var(--b-ok-bg); }
.att-w.dup { opacity: .65; border-style: dashed; }
.att-w label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.att-w label input { width: 18px; height: 18px; flex: none; }
.att-n { font-weight: 700; font-size: 13px; line-height: 1.3; } .att-n small { display: block; font-weight: 400; opacity: .7; font-size: 12px; }
.att-ot { width: 66px; padding: 4px 6px; text-align: center; font-size: 13px; }
.att-ot:disabled { visibility: hidden; }
.att-warn { grid-column: 1 / -1; font-size: 12px; color: var(--ds-warning, #ffd54f); }
.att-sheet { overflow-x: auto; }
table.att-t { border-collapse: collapse; font-size: 12px; width: 100%; }
table.att-t th, table.att-t td { padding: 5px 6px; border: 1px solid var(--ds-border, rgba(255,255,255,.14)); text-align: center; white-space: nowrap; }
table.att-t td.n { text-align: right; font-weight: 700; }
table.att-t td.p { color: var(--ds-success, #a5d6a7); font-weight: 700; } table.att-t td.f { opacity: .35; }
table.att-t .tot { background: var(--ds-surface-row-hover, rgba(255,255,255,.08)); font-weight: 700; }
.att-pos { color: var(--ds-success, #a5d6a7); } .att-neg { color: var(--ds-danger, #ffb4b4); }
.att-dupnote { margin-top: 8px; font-size: 12px; color: var(--ds-warning, #ffd54f); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; padding: 5px 12px; }
.chips .chip input { width: 15px; height: 15px; }
.chk-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; padding-bottom: 8px; }
.chk-inline input { width: 16px; height: 16px; }

/* Copyright: company name + developer name below */
@media (min-width: 900px) {
  body.nb .page::after { content: none !important; }
  body.nb .nb-dev { bottom: 12px; padding-top: 12px; font-size: 13px; line-height: 1.9;
    background: linear-gradient(90deg, transparent, rgba(190, 210, 235, .45), transparent) top center / 380px 1px no-repeat; }
  body.nb .nb-dev .nb-dev-c { display: block; letter-spacing: .04em; color: rgba(206, 222, 242, .95); }
  body.nb .nb-dev .nb-dev-n { display: block; font-size: 12px; }
}

/* Home with many cards (>8): sizes scale with screen height so the page and credits fit one screen without large gaps */
@media (min-width: 1200px) {
  .menu.home-grid.dense { gap: clamp(8px, 2vh, 20px) 18px; }
  .menu.home-grid.dense .menu-card { padding: clamp(7px, 1.8vh, 18px) 22px; min-height: clamp(60px, 13.2vh, 112px); gap: 16px; }
  .menu.home-grid.dense .menu-card .icon-box { width: clamp(66px, 9.4vh, 78px); height: clamp(50px, 7.6vh, 62px); }
  .menu.home-grid.dense .menu-card .icon-box img { max-width: clamp(58px, 8.4vh, 68px); max-height: clamp(38px, 5.8vh, 46px); }
  body.home-dense .pj-strip { margin-top: clamp(8px, 2vh, 20px); }
  body.home-dense .pj-card { width: clamp(120px, 26.4vh, 240px); }
  body.home-dense .page { padding-bottom: 84px; }
}

/* Reports list (Itqan): search inside the filter bar + table without a selection column */
.ra-filters .ra-search { flex: 1 1 260px; }
.ra-filters .ra-exp { min-width: 0; } .ra-filters .ra-exp .btn { margin: 0; width: auto; }
.ra-table.nosel td:first-child { width: auto; text-align: inherit; }
.ra-per[hidden] { display: none !important; }

/* Smooth navigation: side menu and top bar stay visually fixed between pages (view transitions) */
@view-transition { navigation: auto; }
.sidenav { view-transition-name: sidenav; }
.topbar { view-transition-name: topbar; }
::view-transition-group(sidenav), ::view-transition-group(topbar) { animation-duration: 0s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
@media print { .sidenav, .topbar { view-transition-name: none; } }

/* Temporary copy of the bell and user name until the real ones mount (not clickable) */
.ub-ghost, .ub-ghost-bell { pointer-events: none; }
.ub-ghost { display: contents; }
.ub-ghost-bell .bell-panel { display: none !important; }

/* Report writing (desktop): compact so real work shows from the top */
@media (min-width: 1100px) {
  /* Basic data: title repeated in the top bar; contractor/owner/consultant/dates on one line instead of cards */
  body.has-nav .wiz-top { padding: 10px 14px; margin-bottom: 8px; }
  body.has-nav .wiz-top > .panel-title { display: none; }
  body.has-nav .wiz-top .rgrid.c2 { grid-template-columns: 3fr 1.2fr; }
  body.has-nav .wiz-top .rgrid.c3 { grid-template-columns: 3fr 1.2fr 1.2fr; }
  body.has-nav .wiz-top .rgrid .field { margin-bottom: 6px; }
  body.has-nav .wiz-top .info-grid { grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 4px 16px; margin: 0 0 6px; }
  body.has-nav .wiz-top .info-grid div { display: flex; align-items: baseline; gap: 6px; background: none; padding: 0; border-radius: 0; }
  body.has-nav .wiz-top .info-grid span { display: inline; font-size: 12px; }
  body.has-nav .wiz-top .info-grid span::after { content: ":"; }
  body.has-nav .wiz-top .info-grid b { display: inline; margin: 0; font-size: 13px; }
  body.has-nav .wiz-top .wx { margin-top: 0; padding: 5px 10px; }
  /* Thinner completion bar */
  body.has-nav .wiz-progress { padding: 5px 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 14px; }
  body.has-nav .wiz-progress .wp-t { margin: 0; flex: none; font-size: 13px; }
  body.has-nav .wiz-progress .pbar { flex: 1; height: 7px; }
  /* Tabs */
  body.has-nav .wiz-rail { top: 80px; padding: 5px; margin-bottom: 6px; gap: 6px; }
  body.has-nav .wiz-tab { padding: 7px 10px; font-size: 13px; }
  body.has-nav .wiz-tab i { width: 24px; height: 24px; }
  /* Items: one item takes the full width instead of half a card; smaller fields */
  body.has-nav .wiz-main .panel { padding: 10px 14px; margin-bottom: 8px; }
  body.has-nav .wiz-main .panel-title { margin: 0 0 6px; }
  body.has-nav .wiz-main .rrow { padding: 8px 12px; }
  body.has-nav .wiz-main .rrow-head { margin-bottom: 4px; }
  #labor > .rrow:only-child, #items > .rrow:only-child, #inspections > .rrow:only-child, #materials > .rrow:only-child,
  #waste > .rrow:only-child, #requests > .rrow:only-child, #obstacles > .rrow:only-child, #visitors > .rrow:only-child { grid-column: 1 / -1; }
  body.has-nav .wiz-main .field { margin-bottom: 6px; }
  body.has-nav .wiz-main .rgrid .field { margin-bottom: 6px; }
  body.has-nav .wiz-main .field label { margin-bottom: 2px; font-size: 12px; }
  body.has-nav .wiz-main .field input, body.has-nav .wiz-main .field select { padding: 6px 10px; min-height: 34px; font-size: 14px; }
  body.has-nav .wiz-main .field textarea { padding: 6px 10px; font-size: 14px; }
  /* Small add buttons instead of a full row */
  body.has-nav .wiz-main .add-row { width: auto; padding: 5px 16px; margin-top: 2px; font-size: 13px; }
  body.has-nav .wiz-nav { margin-top: 8px; }
}
@media (min-width: 1100px) { body.has-nav .wiz-main .field textarea { min-height: 38px; } }

/* Task list (tiles): a fully checked period collapses into one line; a period with an exception stays open */
.ck-tslot h4 { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 6px 0 4px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); user-select: none; }
.ck-tslot h4:hover { background: rgba(255,255,255,.1); }
.ck-tslot h4 span { flex: 1; color: var(--text, #fff); font-weight: bold; }
.ck-tslot h4 small { font-size: 12px; color: #ffcc80; }
.ck-tslot h4 small.all { color: #8fe3a8; }
.ck-tslot h4 i { font-style: normal; font-size: 11px; color: var(--muted); }
.ck-tslot.closed h4 { margin-bottom: 2px; }

/* Long text boxes (work description etc.): small and grow with the text */
.wiz textarea { resize: none; overflow: hidden; min-height: 38px; }
.ra-table .rr-info { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); font-weight: normal; }
.ra-table .rr-info.st-yellow { color: #ffd54f; }
.rr-lock { cursor: help; font-size: 12px; }
#lgDetails { resize: none; overflow: hidden; min-height: 38px; }
.link-btn.ok { color: var(--b-ok); font-weight: bold; }
.pn-table tr.late td:last-child { box-shadow: inset 3px 0 0 #ff6b5e; }
.pn-table td:first-child { max-width: 360px; }

/* Daily reports (home + log): "Required now" strip */
.td-box { padding: 0; margin-bottom: 10px; }
.td-box > summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.td-box > summary::-webkit-details-marker { display: none; }
.td-box > summary b { font-size: 15px; }
.td-box.done > summary b { color: #8fe3a8; }
.td-box.need { border-color: rgba(255, 193, 7, .45); }
.td-box .td-date { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.td-box .td-new { text-decoration: none; margin: 0; width: auto; }
.td-box .td-flt select { width: auto; min-width: 180px; max-width: 280px; margin: 0; padding-block: 6px; }
.td-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.td-row > b { min-width: 150px; }
.td-row .td-st { flex: 1; font-size: 13px; color: var(--muted); }
.td-row .td-st .it-dot { display: inline-block; margin-inline-end: 6px; }
.td-row .td-act { display: flex; gap: 8px; margin-inline-start: auto; }
.td-row .td-act .btn { margin: 0; width: auto; }
.td-row.warn { background: rgba(255, 193, 7, .08); }
.td-row.ok > b { color: #cdeed8; }
.td-row .td-act .btn, .td-box .td-new { text-decoration: none; }
.rr-me { color: #8fe3a8; }
#iCity { opacity: .9; cursor: default; }

/* Login log and users list: two cards per row on wide screens */
@media (min-width: 1100px) {
  body.page-v2 .us-list.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-2) 14px; }
  body.page-v2 .us-list.two .us-row.lg { grid-template-columns: 36px minmax(0, 1fr) auto auto; }
  body.page-v2 .us-list.two .us-row { min-width: 0; }
  body.page-v2 .us-list.two .us-main small { overflow: hidden; text-overflow: ellipsis; }
}
body.page-v2 .pm-t tr.pm-sec { cursor: pointer; } body.page-v2 .pm-t tr.pm-sec:hover td { background: rgba(120, 160, 220, .2); } .pm-arw { display: inline-block; width: 14px; opacity: .8; }
body.page-v2 .us-row.grp { cursor: pointer; grid-template-columns: 110px minmax(160px, 1fr) 2fr 20px; }
body.page-v2 .us-row.grp.shut { grid-template-columns: 110px minmax(160px, 1fr) 20px; }
body.page-v2 .us-code { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-inline-end: 8px; border-radius: 6px; background: rgba(63,169,245,.18); border: 1px solid rgba(63,169,245,.45); color: #9fd3ff; direction: ltr; display: inline-block; vertical-align: middle; }

/* Users: collapsed card (name + plus sign) opens with its data */
body.page-v2 .us-list.fold { align-items: start; }
body.page-v2 .us-card { background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-success); border-radius: var(--ds-radius-md); min-width: 0; }
body.page-v2 .us-card.stale { border-inline-start-color: var(--ds-warning); }
body.page-v2 .us-card.open { border-color: rgba(63, 169, 245, 0.5); }
body.page-v2 .us-head { display: flex; align-items: center; gap: var(--ds-space-3); width: 100%; padding: var(--ds-space-2) var(--ds-space-3); background: none; border: 0; color: var(--ds-text); font: inherit; text-align: right; cursor: pointer; }
body.page-v2 .us-head b { flex: 1; min-width: 0; font-size: var(--ds-card-title); font-weight: 600; }
body.page-v2 .us-plus { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--b-neutral-bd); border-radius: 10px; font-size: 18px; line-height: 1; }
body.page-v2 .us-head:hover .us-plus { border-color: var(--ds-primary); }
body.page-v2 .us-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-2); padding: 0 var(--ds-space-3) var(--ds-space-3); }
body.page-v2 .us-body small { color: var(--ds-text-3); }
@media (max-width: 760px) { body.page-v2 .us-list.two.fold { grid-template-columns: 1fr; } }

body.page-v2 .us-rchecks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; }
body.page-v2 .us-rc { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* Groups: collapsed cards, 2 per row like users */
body.page-v2 .us-list.grpl .us-row.grp, body.page-v2 .us-list.grpl .us-row.grp.shut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: var(--ds-space-2) var(--ds-space-3); }
body.page-v2 .us-list.grpl .us-row.grp .us-main { flex: 1; min-width: 0; }
body.page-v2 .us-list.grpl .us-row.grp .us-projs { flex-basis: 100%; order: 5; }
body.page-v2 .us-list.grpl .cg-edit { flex-basis: 100%; order: 6; }
body.page-v2 .us-list.grpl .pm-arw.us-plus { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--b-neutral-bd); border-radius: var(--ds-radius-sm); font-size: 18px; }

/* Open group: colored and clear; add-member above the members */
body.page-v2 .us-list.grpl .us-row.grp.open { background: rgba(63, 169, 245, 0.16); border-color: var(--ds-primary); box-shadow: 0 0 0 1px var(--ds-primary) inset; }
body.page-v2 .us-list.grpl .cg-edit { order: 4; }
body.page-v2 .us-list.grpl .us-row.grp .us-projs { order: 5; }

/* Important alerts strip on home */
.alert-ticker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 6px 12px; border: 1px solid rgba(240, 120, 90, 0.55); background: rgba(190, 60, 40, 0.16); border-radius: 12px; overflow: hidden; }
.alert-ticker .tk-lbl { flex: none; font-weight: 700; white-space: nowrap; }
.alert-ticker .tk-view { flex: 1; min-width: 0; overflow: hidden; }
.alert-ticker .tk-track { display: flex; gap: 40px; width: max-content; }
.alert-ticker .tk-track.move { animation: tkmove 30s linear infinite; }
.alert-ticker:hover .tk-track { animation-play-state: paused; }
.alert-ticker .tk-it { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: inherit; text-decoration: none; }
.alert-ticker .tk-it:hover { text-decoration: underline; }
.alert-ticker .tk-x { flex: none; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; font-size: 16px; }
@keyframes tkmove { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .alert-ticker .tk-track.move { animation: none; flex-wrap: wrap; width: auto; } }
.alert-ticker { margin: 10px 16px 0; }

.alert-ticker .tk-view { direction: ltr; }
.alert-ticker .tk-it { direction: rtl; }
@keyframes tkmove { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.alert-ticker .tk-it.ann { padding: 0 4px; }
.alert-ticker .tk-it.ann.red b { color: #ffb4a8; }
.alert-ticker .tk-off { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 12px; padding: 0 2px; }

body.page-v2 .drw-g { margin-bottom: 10px; } body.page-v2 .drw-g > summary { cursor: pointer; padding: 4px 2px; font-size: var(--ds-card-title); } body.page-v2 .drw-g[open] > summary { margin-bottom: 8px; }

.alert-ticker .tk-track { gap: 0; }
.alert-ticker .tk-unit { display: flex; gap: 48px; justify-content: flex-end; padding-inline-start: 48px; flex: none; box-sizing: border-box; }
@media (min-width: 900px) { .alert-ticker { margin-top: -12px; } }

/* Light theme (for use in sunlight): data-theme="light" on html */
/* Auto-generated from style.css for the light theme */
html[data-theme="light"] .menu-card:hover { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .menu-card .arrow { color: #0b1b3a; }
html[data-theme="light"] input, html[data-theme="light"] select { color: #0b1b3a; }
html[data-theme="light"] .notice code { background: rgba(255,255,255,0.7); }
html[data-theme="light"] .row { border: 1px solid rgba(60,80,120,0.6); }
html[data-theme="light"] .row:hover { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .row .count { color: #005499; }
html[data-theme="light"] .modal .none { color: #394960; }
html[data-theme="light"] .summary .none { color: #394960; }
html[data-theme="light"] .chart .bar { fill: #005999; }
html[data-theme="light"] .chart .grid { stroke: rgba(11,27,58,0.75); }
html[data-theme="light"] .chart .axis { stroke: rgba(11,27,58,0.75); }
html[data-theme="light"] .chart .lbl, html[data-theme="light"] .chart .val { fill: #304a69; }
html[data-theme="light"] .chart .val { fill: #0b1b3a; }
html[data-theme="light"] .chart .hit:hover { fill: rgba(11,27,58,0.75); }
html[data-theme="light"] .chart-tip { border: 1px solid rgba(60,80,120,0.595); }
html[data-theme="light"] .table th { border-bottom: 1px solid rgba(60,80,120,0.425); }
html[data-theme="light"] .table td { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .st-red { color: #990000; }
html[data-theme="light"] .st-green { color: #009921; }
html[data-theme="light"] .st-yellow { color: #997400; }
html[data-theme="light"] .row .main > span.st-green { color: #009921; }
html[data-theme="light"] .row .main > span.st-yellow { color: #997400; }
html[data-theme="light"] .st-gray { color: #394960; }
html[data-theme="light"] .st-orange { color: #995b00; }
html[data-theme="light"] .st-blue { color: #006999; }
html[data-theme="light"] .pbar { background: rgba(11,27,58,0.108); }
html[data-theme="light"] .hbar .ht { background: rgba(11,27,58,0.09); }html[data-theme="light"] .checks label { background: rgba(11,27,58,0.045); }
html[data-theme="light"] .toast { border: 1px solid rgba(60,80,120,0.6); }
html[data-theme="light"] textarea { color: #0b1b3a; }
html[data-theme="light"] .info-grid div { background: rgba(11,27,58,0.045); }
html[data-theme="light"] .rrow { border: 1px solid rgba(60,80,120,0.374); background: rgba(11,27,58,0.027); }
html[data-theme="light"] .add-row { border: 1.2px dashed rgba(60,80,120,0.6); color: #0b1b3a; }
html[data-theme="light"] .add-row:hover { border-color: rgba(60,80,120,0.6); background: rgba(11,27,58,0.045); }
html[data-theme="light"] .total-labor b { color: #0b1b3a; }
html[data-theme="light"] .field-error { color: #990c00; }
html[data-theme="light"] .report-row .edit-link { color: #015598; }
html[data-theme="light"] .report-row .edit-locked { color: rgba(11,27,58,0.75); }
html[data-theme="light"] .obs-meta b { color: #0b1b3a; }html[data-theme="light"] .plan-head { border-bottom: 1px solid rgba(60,80,120,0.306); }
html[data-theme="light"] .sec > summary:hover { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .sec .menu-card { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .d3 .glass { background: linear-gradient(150deg, #ffffff 0%, #ffffff 55%, #ffffff 100%); border: 1.2px solid rgba(60,80,120,0.442); border-top-color: rgba(60,80,120,0.6); border-bottom-color: rgba(60,80,120,0.3); }
html[data-theme="light"] .d3 .menu-card::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(11,27,58,0.144), transparent 60%); }
html[data-theme="light"] .d3 .menu-card:hover { border-color: rgba(60,80,120,0.6); border-top-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .d3 .sec > summary:hover { background: rgba(11,27,58,0.045); }
html[data-theme="light"] .d3 .sec .menu-card { background: linear-gradient(150deg, rgba(58,86,138,.7), #ffffff); }
html[data-theme="light"] .d3 .btn { border: 1px solid var(--b-bd); border-top-color: var(--b-bd-top); }
html[data-theme="light"] .d3 .btn.secondary { background: var(--b-neutral-bg); }
@media (min-width: 900px) {
  html[data-theme="light"] body.nb::before { background-image: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.63) 100%); }
  html[data-theme="light"] body.nb .page::after { color: rgba(24,71,129,0.92); }
  html[data-theme="light"] body.nb .nb-dev { color: rgba(28,69,125,0.98); }
  html[data-theme="light"] body.nb .nb-dev b { color: #0b1b3a; }
}
@media (max-width: 899px) {
  html[data-theme="light"] body.nb .nb-dev { color: rgba(28,70,125,0.95); }
  html[data-theme="light"] body.nb .nb-dev b { color: #0b1b3a; }
  html[data-theme="light"] body.nb .page::after { color: rgba(28,70,125,0.95); }
}
html[data-theme="light"] body.login::before { background-image: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.63) 100%); }
@media (max-width: 899px) {
  html[data-theme="light"] body.nb::before { background-image: linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.63) 100%); }
}
@media (min-width: 900px) {
  html[data-theme="light"] body.nb .topbar { background: linear-gradient(180deg, #ffffff, #ffffff); border-bottom: 1px solid rgba(60,80,120,0.3); }
  html[data-theme="light"] body.nb .topbar::before { border-inline-end: 1px solid rgba(60,80,120,0.34); }
  html[data-theme="light"] body.nb .topbar > a { border: 1px solid rgba(60,80,120,0.442); background: rgba(11,27,58,0.063); color: #0b1b3a; }
  html[data-theme="light"] body.nb .topbar > a:hover { background: rgba(11,27,58,0.135); border-color: rgba(60,80,120,0.6); }
  html[data-theme="light"] body.nb #userBar > span { background: rgba(11,27,58,0.054); border: 1px solid rgba(60,80,120,0.3); }
  html[data-theme="light"] body.nb #userBar .link-btn.danger { background: var(--b-bad-bg); color: var(--b-bad); }
}
@media (min-width: 900px) {
  html[data-theme="light"] body.nb .glass, html[data-theme="light"] body.nb .panel, html[data-theme="light"] body.nb .stat, html[data-theme="light"] body.nb .obs, html[data-theme="light"] body.nb .menu-card, html[data-theme="light"] body.nb .sec .menu-card, html[data-theme="light"] body.nb .login-box { background: linear-gradient(150deg, rgba(60, 94, 152, .30), rgba(255,255,255,0.85)); border-color: rgba(60,80,120,0.34); border-top-color: rgba(60,80,120,0.6); }
  html[data-theme="light"] body.nb .menu-card:hover, html[data-theme="light"] body.nb .obs:hover { background: linear-gradient(150deg, rgba(74, 112, 176, .34), rgba(255,255,255,0.83)); }
  html[data-theme="light"] body.nb .sec > summary { background: linear-gradient(150deg, rgba(60, 94, 152, .26), rgba(255,255,255,0.83)); border: 1px solid rgba(60,80,120,0.34); border-top-color: rgba(60,80,120,0.6); }
  html[data-theme="light"] body.nb .sec > summary:hover { background: linear-gradient(150deg, rgba(74, 112, 176, .34), rgba(255,255,255,0.87)); }
  html[data-theme="light"] body.nb .row { background: rgba(255,255,255,0.79); border-color: rgba(60,80,120,0.578); }
  html[data-theme="light"] body.nb input, html[data-theme="light"] body.nb select, html[data-theme="light"] body.nb textarea { background: rgba(255,255,255,0.95); }
  html[data-theme="light"] body.nb .rrow { background: rgba(11,27,58,0.018); }
  html[data-theme="light"] body.nb .info-grid div { background: rgba(11,27,58,0.054); }
  html[data-theme="light"] body.nb .menu-card .text > span, html[data-theme="light"] body.nb .subtitle, html[data-theme="light"] body.nb .muted { color: #234976; }
}
html[data-theme="light"] .pcard::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(11,27,58,0.144), transparent 60%); }
html[data-theme="light"] .pcard:hover { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .pc-head .pct { color: #005499; }@media (min-width: 900px) {
  html[data-theme="light"] body.nb .dqsec { background: linear-gradient(150deg, rgba(60, 94, 152, .34), #ffffff); border: 1px solid rgba(60,80,120,0.34); border-top-color: rgba(60,80,120,0.6); }
}html[data-theme="light"] .tabs button:hover { border-color: var(--b-sel-bd); }html[data-theme="light"] .legend .c-off { background: rgba(11,27,58,0.225); }
html[data-theme="light"] .cal-d { color: #0b1b3a; border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.045); }
html[data-theme="light"] .cal-d.has { background: linear-gradient(150deg, rgba(46,160,90,.65), #ffffff); }
html[data-theme="light"] .cal-d.miss { background: linear-gradient(150deg, rgba(200,67,58,.55), #ffffff); }html[data-theme="light"] .la-banner:hover { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .row.la { border-inline-start: 4px solid rgba(60,80,120,0.425); }
html[data-theme="light"] body.nb .section-title { color: #174782; }
html[data-theme="light"] .g-axis { border-bottom: 1px solid rgba(60,80,120,0.51); }
html[data-theme="light"] .g-gl { background: rgba(11,27,58,0.09); }
html[data-theme="light"] .g-today b { color: #997400; }
html[data-theme="light"] .g-row { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .g-row:hover { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .g-bar span { color: #0b1b3a; }
html[data-theme="light"] .kcol { border: 1px solid rgba(60,80,120,0.306); background: rgba(255,255,255,0.8); }
html[data-theme="light"] .kcol.open header b { color: #995a00; }
html[data-theme="light"] .kcol.progress header b { color: #005499; }
html[data-theme="light"] .kcol.resolved header b { color: #178237; }
html[data-theme="light"] .kcount { background: rgba(11,27,58,0.108); }
html[data-theme="light"] .kcol.over { background: rgba(255,255,255,0.8); }
html[data-theme="light"] .kempty { border: 1px dashed rgba(60,80,120,0.34); }html[data-theme="light"] .stats.four .st-blue, html[data-theme="light"] .st-blue { color: #005499; }
html[data-theme="light"] .kb-col { border: 1px solid rgba(60,80,120,0.306); border-top-color: rgba(60,80,120,0.6); background: rgba(255,255,255,0.83); }
html[data-theme="light"] .kb-n { background: rgba(11,27,58,0.126); }
html[data-theme="light"] .hdot { color: #384861; }
html[data-theme="light"] .hdot.h-green { color: #158441; }
html[data-theme="light"] .hdot.h-yellow { color: #996b00; }
html[data-theme="light"] .hdot.h-red { color: #990900; }
html[data-theme="light"] .hdot.h-gray { color: #384861; }
html[data-theme="light"] .cal-d.cg:hover { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .dc { border: 1px solid rgba(60,80,120,0.425); background: rgba(11,27,58,0.072); }html[data-theme="light"] .bell-panel { border: 1px solid rgba(60,80,120,0.374); }
html[data-theme="light"] .bell-h { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .bell-it { color: #0b1b3a; }
html[data-theme="light"] .bell-it:hover { background: rgba(11,27,58,0.081); }
html[data-theme="light"] .bell-it span { color: #274372; }
html[data-theme="light"] .bell-f { border-top: 1px solid rgba(60,80,120,0.3); }html[data-theme="light"] .wiz-tab i { background: rgba(11,27,58,0.126); }html[data-theme="light"] .wiz-tab.on i { background: rgba(11,27,58,0.252); }
html[data-theme="light"] .sub-card.open { border-color: rgba(60,80,120,0.6); }
html[data-theme="light"] .tbl tr.clickable:hover { background: rgba(11,27,58,0.072); }
html[data-theme="light"] .vz-big { fill: #0b1b3a; }
html[data-theme="light"] .vz-sm { fill: #2a456f; }
html[data-theme="light"] .vz-grid { stroke: rgba(11,27,58,0.75); }
html[data-theme="light"] .vz-ax { fill: #2e466b; }
html[data-theme="light"] .vz-pr:hover { background: rgba(11,27,58,0.063); }
html[data-theme="light"] .vz-tip { background: #ffffff; border: 1px solid rgba(60,80,120,0.425); color: #0b1b3a; }
html[data-theme="light"] .wp-t span { color: #995b00; }
html[data-theme="light"] .wiz-review { border-top: 1px dashed rgba(60,80,120,0.34); }
html[data-theme="light"] .rv { color: #0b1b3a; border: 1px solid rgba(60,80,120,0.34); background: rgba(11,27,58,0.054); }
html[data-theme="light"] .rv:hover { background: rgba(11,27,58,0.126); }
@media (min-width: 1100px) {
  html[data-theme="light"] body.has-nav .wiz-rail { background: #ffffff; border: 1px solid rgba(60,80,120,0.3); }
}
html[data-theme="light"] .it-row { border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.045); }
html[data-theme="light"] .it-row.clickable:hover { background: rgba(11,27,58,0.09); }html[data-theme="light"] .chk-role.full b { color: #178237; }
html[data-theme="light"] .chk-row { border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.036); }
html[data-theme="light"] .chk-b { background: rgba(11,27,58,0.063); border: 1px solid rgba(60,80,120,0.34); }
html[data-theme="light"] .ck-slot { border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.036); }
html[data-theme="light"] .hr-reason { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .hr-line { stroke: #0a468f; }
html[data-theme="light"] .hr-dot { fill: #0a468f; }html[data-theme="light"] .ap-box { border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.045); }html[data-theme="light"] .ap-returned a { color: #991c00; }
html[data-theme="light"] .wx { background: rgba(11,27,58,0.045); border: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .sub-title { color: #003699; }
html[data-theme="light"] .pl-meta { color: #164283; }
html[data-theme="light"] .rt-card { border: 1px solid rgba(60,80,120,0.3); background: rgba(11,27,58,0.036); }html[data-theme="light"] .rt-b.fill { color: #0b1b3a; }
html[data-theme="light"] .ev-detail td { background: rgba(11,27,58,0.027); }
html[data-theme="light"] .today-strip .ts-l { color: #003699; }
html[data-theme="light"] .ts-c { background: rgba(11,27,58,0.054); border: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .ts-c.ok b { color: #178237; }
html[data-theme="light"] .ts-c.bad b { color: #991800; }
html[data-theme="light"] .ts-c:hover { background: rgba(11,27,58,0.108); }html[data-theme="light"] .ck-ring .trk { stroke: rgba(11,27,58,0.75); }
html[data-theme="light"] .ck-ring text { fill: #0b1b3a; }
html[data-theme="light"] .ck-ring.go .val { stroke: #0a468f; }
html[data-theme="light"] .ck-ring.ok .val { stroke: #158441; }
html[data-theme="light"] .ck-ring.warn .val { stroke: #967303; }
html[data-theme="light"] .ck-off { border: 2px dashed rgba(60,80,120,0.425); }
html[data-theme="light"] .ck-bar { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .ck-tls::before { background: rgba(11,27,58,0.108); }
html[data-theme="light"] .ck-tlr { border-inline-start: 4px solid rgba(60,80,120,0.306); }html[data-theme="light"] .ck-stack { background: rgba(11,27,58,0.09); }
html[data-theme="light"] .ck-ic { border: 2px solid rgba(60,80,120,0.595); }
html[data-theme="light"] .lab-abs { color: #991d00; }
html[data-theme="light"] .lg-type span { background: rgba(11,27,58,0.054); border: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .lg-month { color: #003699; }
html[data-theme="light"] .lg-item::before { background: rgba(11,27,58,0.108); }
html[data-theme="light"] .lg-dot { background: rgba(11,27,58,0.072); border: 2px solid rgba(60,80,120,0.34); }
html[data-theme="light"] .ub-name { color: #003c99; }
html[data-theme="light"] .ls-row.fixed em { background: rgba(11,27,58,0.09); }html[data-theme="light"] .report-row .del-link { color: #990c00; }
html[data-theme="light"] .rrow .lab-work { border-top: 1px dashed rgba(60,80,120,0.3); }
html[data-theme="light"] .report-row .rr-b { color: #003799; background: rgba(11,27,58,0.063); border: 1px solid rgba(60,80,120,0.374); }
html[data-theme="light"] .report-row .rr-b:hover { background: rgba(11,27,58,0.144); }
html[data-theme="light"] .report-row .rr-b.edit-link { color: #0b1b3a; }
html[data-theme="light"] .report-row .rr-b.del { color: #990000; }html[data-theme="light"] body.page-v2 .um-btn { background: rgba(11,27,58,0.054); }
html[data-theme="light"] body.page-v2 .um-item:hover { background: rgba(11,27,58,0.063); }html[data-theme="light"] body.page-v2 .report-row .rr-b.edit-link { color: #0b1b3a; }
html[data-theme="light"] body.page-v2 .report-row .rr-b.ghost { border: 1px solid rgba(60,80,120,0.476); }
html[data-theme="light"] body.page-v2 .report-row .rr-b.ghost:hover { background: rgba(11,27,58,0.054); }
html[data-theme="light"] body.page-v2 .report-row .rr-b.del:hover, html[data-theme="light"] body.page-v2 .report-row .rr-b.del:focus-visible { color: #0b1b3a; }
html[data-theme="light"] body.page-v2 .table td { border-bottom-color: rgba(60,80,120,0.3); }
html[data-theme="light"] body.page-v2 .table tbody tr:hover td { background: rgba(11,27,58,0.027); }
html[data-theme="light"] body.page-v2 .us-role.r-admin, html[data-theme="light"] body.page-v2 .us-role.r-manager { color: #005099; }
html[data-theme="light"] body.page-v2 .us-role.r-hr, html[data-theme="light"] body.page-v2 .us-role.r-followup, html[data-theme="light"] body.page-v2 .us-role.r-planning, html[data-theme="light"] body.page-v2 .us-role.r-basma, html[data-theme="light"] body.page-v2 .us-role.r-ohda, html[data-theme="light"] body.page-v2 .us-role.r-ohrep { color: #350099; }html[data-theme="light"] body.page-v2 .ad-set { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] body.page-v2 .ad-counts > div { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] body.page-v2 .it-wrap { background: #ffffff; }
html[data-theme="light"] body.page-v2 .it-table th { background: rgba(11,27,58,0.036); }
html[data-theme="light"] body.page-v2 .it-table td { border-bottom-color: rgba(60,80,120,0.3); }
html[data-theme="light"] body.page-v2 .it-table input { background: rgba(255,255,255,0.63); }
html[data-theme="light"] body.page-v2 .it-del:hover { color: #0b1b3a; }
html[data-theme="light"] .login-foot b { color: rgba(24,71,129,0.92); }
html[data-theme="light"] .login-foot span { color: rgba(20,69,133,0.98); }
html[data-theme="light"] body.page-v2 .pend-banner { background: #ffffff; }
html[data-theme="light"] .pj-card { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .pj-card { background: linear-gradient(110deg, rgba(11,27,58,0.045) 30%, rgba(11,27,58,0.108) 50%, rgba(11,27,58,0.045) 70%) 0 0 / 300% 100%; }
html[data-theme="light"] .pj-card:has(img.ok) { background: rgba(11,27,58,0.036); }
html[data-theme="light"] .pj-card figcaption { background: linear-gradient(180deg, transparent, #ffffff 55%); }
html[data-theme="light"] .pj-card figcaption b { color: #0b1b3a; }
html[data-theme="light"] .sec-links { background: #ffffff; }
html[data-theme="light"] .sec-links-t { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .sec-links a { border-bottom: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] body.page-v2 .pm-wrap { background: #ffffff; }
html[data-theme="light"] html:not([data-theme="light"]) body.page-v2 .us-row { background: #ffffff; }
html[data-theme="light"] html:not([data-theme="light"]) body.page-v2 .us-row:hover { background: #ffffff; }
html[data-theme="light"] .att-empty { border: 1px dashed var(--ds-border, rgba(60,80,120,0.3)); }
html[data-theme="light"] .att-w { border: 1px solid var(--ds-border, rgba(60,80,120,0.3)); background: var(--ds-surface-row, rgba(11,27,58,0.036)); }
html[data-theme="light"] table.att-t th, html[data-theme="light"] table.att-t td { border: 1px solid var(--ds-border, rgba(60,80,120,0.3)); }
html[data-theme="light"] table.att-t .tot { background: var(--ds-surface-row-hover, rgba(11,27,58,0.072)); }
@media (min-width: 900px) {
  html[data-theme="light"] body.nb .nb-dev .nb-dev-c { color: rgba(24,71,129,0.95); }
}
html[data-theme="light"] .ck-tslot h4 { background: rgba(11,27,58,0.045); }
html[data-theme="light"] .ck-tslot h4:hover { background: rgba(11,27,58,0.09); }
html[data-theme="light"] .ck-tslot h4 small { color: #995c00; }
html[data-theme="light"] .ck-tslot h4 small.all { color: #178237; }
html[data-theme="light"] .ra-table .rr-info.st-yellow { color: #997400; }html[data-theme="light"] .td-box.done > summary b { color: #178237; }
html[data-theme="light"] .td-row { border-top: 1px solid rgba(60,80,120,0.3); }
html[data-theme="light"] .td-row.ok > b { color: #1f7a3d; }
html[data-theme="light"] .rr-me { color: #178237; }
html[data-theme="light"] body.page-v2 .us-code { color: #005399; }
html[data-theme="light"] body.page-v2 .us-plus { border: 1px solid rgba(60,80,120,0.476); }
html[data-theme="light"] body.page-v2 .us-list.grpl .pm-arw.us-plus { border: 1px solid rgba(60,80,120,0.476); }
html[data-theme="light"] .alert-ticker .tk-it.ann.red b { color: #991500; }

/* Preview: light theme (sunlight) - high contrast, no background image, clear borders */
html[data-theme="light"], html[data-theme="light"] body, html[data-theme="light"] body.page-v2 {
  --bg-top: #f4f7fb; --bg-bottom: #e8eef6;
  --card: #ffffff; --card-strong: #ffffff; --card-border: #7f93b0;
  --input: #ffffff; --input-border: #4b6286;
  --text: #0b1b3a; --muted: #3c4f6e;
  --accent: #0b5cb8; --yellow: #8a5a00; --green: #1b6b36; --danger: #b3261e;
  --icon-box: #e6f1fd; --icon-box-border: #9cc3ec;
  --ds-primary: #0b5cb8; --ds-success: #1b6b36; --ds-warning: #8a5a00; --ds-danger: #b3261e;
  --ds-text: #0b1b3a; --ds-text-2: #2c3f5f; --ds-text-3: #4b5f80;
  --ds-border: #8da1bf; --ds-surface-row: rgba(255,255,255,.58); --ds-surface-row-hover: rgba(234,242,252,.82);
  color-scheme: light;
  --b-p1: #3f92e0;
  --b-p2: #1a4e93;
  --b-bd: rgba(255,255,255,.55);
  --b-bd-top: rgba(255,255,255,.85);
  --b-neutral-bg: #f2f6fb;
  --b-neutral-bd: #6c82a3;
  --b-neutral-ink: #0b1b3a;
  --b-sel-bg: #0b5cb8;
  --b-sel-bd: #0b5cb8;
  --b-sel-ink: #fff;
  --b-tray-bg: rgba(11,27,58,.05);
  --b-tray-bd: rgba(60,80,120,.3);
  --b-chip-bd: rgba(60,80,120,.35);
  --b-hover-bg: rgba(11,92,184,.10);
  --b-ok: #178237;
  --b-ok-bg: rgba(23,130,55,.10);
  --b-ok-bd: rgba(23,130,55,.4);
  --b-warn: #8a5a00;
  --b-warn-bg: rgba(138,90,0,.10);
  --b-warn-bd: rgba(138,90,0,.4);
  --b-warn-ink: #ffffff;
  --b-bad: #991800;
  --b-bad-bg: rgba(153,24,0,.10);
  --b-bad-bd: rgba(153,24,0,.4);
  --b-info: #005999;
  --b-info-bg: rgba(11,92,184,.10);
  --b-info-bd: rgba(11,92,184,.45);
  --b-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 rgba(11,27,58,.22), 0 6px 14px -8px rgba(11,27,58,.4);
  --b-focus: #0b5cb8;
  --b-chip-bg: rgba(11,27,58,.11);
}
html[data-theme="light"] { background: #eaf1fa; color: #0b1b3a; }
html[data-theme="light"] body { background: transparent; color: #0b1b3a; }
html[data-theme="light"] body.nb::before, html[data-theme="light"] body.login::before { background-color: #eaf1fa !important; background-image: none !important; background-size: cover !important; background-position: center bottom !important; background-repeat: no-repeat !important; }
html[data-theme="light"] body::after { display: none; }
html[data-theme="light"] body.nb .topbar { background: #ffffff; border-bottom: 2px solid #8da1bf; box-shadow: 0 2px 8px rgba(11,27,58,.12); }
html[data-theme="light"] body.nb .topbar > a, html[data-theme="light"] body.nb #userBar > span { background: #f2f6fb; border: 1.5px solid #6c82a3; color: #0b1b3a; }
html[data-theme="light"] body.nb #userBar > span * { color: inherit; }
html[data-theme="light"] body.nb #userBar .link-btn.danger { background: var(--b-bad-bg); color: var(--b-bad); border-color: var(--b-bad-bd); }
html[data-theme="light"] body.nb .glass, html[data-theme="light"] body.nb .panel, html[data-theme="light"] body.nb .menu-card, html[data-theme="light"] body.nb .stat, html[data-theme="light"] body.nb .obs, html[data-theme="light"] body.nb .row {
  background: rgba(255,255,255,.58); backdrop-filter: blur(3px); border: 1.5px solid #7f93b0; border-top-color: #7f93b0;
  box-shadow: 0 2px 6px rgba(11,27,58,.14); text-shadow: none; color: #0b1b3a;
}
html[data-theme="light"] body.nb .menu-card:hover { background: #eaf2fc; border-color: #0b5cb8; }
html[data-theme="light"] body.nb .menu-card .text b { color: #0b1b3a; text-shadow: none; }
html[data-theme="light"] body.nb .menu-card .text > span { color: #3c4f6e; text-shadow: none; }
html[data-theme="light"] .menu-card .arrow { color: #0b1b3a; opacity: 1; text-shadow: none; }
html[data-theme="light"] .menu-card .icon-box { border: 1.5px solid #9cc3ec; box-shadow: none; }
html[data-theme="light"] body.nb .page-head h1, html[data-theme="light"] body.nb h1.title { color: #0b1b3a; text-shadow: none; }
html[data-theme="light"] body.nb .page::after { color: #3c4f6e; }
html[data-theme="light"] body.nb .page::before { color: #4b5f80; }html[data-theme="light"] input, html[data-theme="light"] select, html[data-theme="light"] textarea { background: #fff !important; color: #0b1b3a; border: 1.5px solid #4b6286; box-shadow: none !important; }
html[data-theme="light"] .theme-btn { background: #f2f6fb; color: #0b1b3a; border-color: #6c82a3; }
.theme-btn { cursor: pointer; font: inherit; font-size: 15px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); }

html[data-theme="light"] body.nb .topbar::before { background-image: url("../img/print_company.png"); border-inline-end-color: #8da1bf; }
html[data-theme="light"] .menu-card .icon-box { background: #ffffff; border: 1.5px solid #7f93b0; }
html[data-theme="light"] .um-btn { background: #f2f6fb; border: 1.5px solid #6c82a3; color: #0b1b3a; }
html[data-theme="light"] .um-name, html[data-theme="light"] .um-caret, html[data-theme="light"] .um-btn * { color: #0b1b3a; }
html[data-theme="light"] .um-menu { background: #fff; border: 1.5px solid #6c82a3; color: #0b1b3a; box-shadow: 0 6px 18px rgba(11,27,58,.2); }
html[data-theme="light"] .um-head span { color: #3c4f6e; }
html[data-theme="light"] .um-item { color: #0b1b3a; }
html[data-theme="light"] .um-item.danger { color: #b3261e; }
html[data-theme="light"] .um-item:hover { background: #eaf2fc; }
html[data-theme="light"] .bell, html[data-theme="light"] #bellBtn, html[data-theme="light"] .bell-btn { background: #f2f6fb; border: 1.5px solid #6c82a3; color: #0b1b3a; }
html[data-theme="light"] .pj-card { border: 1.5px solid #7f93b0; }
html[data-theme="light"] .pj-head h2 { color: #0b1b3a; }

html[data-theme="light"] body.nb .sec > summary, html[data-theme="light"] body.nb .dqsec { background: #ffffff; backdrop-filter: none; border: 1.5px solid #7f93b0; box-shadow: 0 2px 6px rgba(11,27,58,.14); text-shadow: none; }
html[data-theme="light"] body.nb .sec > summary:hover { background: #eaf2fc; }
html[data-theme="light"] .btn.secondary, html[data-theme="light"] .btn.ghost, html[data-theme="light"] .d3 .btn.secondary { color: var(--b-neutral-ink); background: var(--b-neutral-bg); border: 1px solid var(--b-neutral-bd); }
html[data-theme="light"] .btn:disabled, html[data-theme="light"] .btn[disabled] { background: #d5deeb; color: #4b5f80; border-color: #9aa9c2; opacity: 1; }
html[data-theme="light"] .modal-backdrop { background: rgba(11,27,58,.5); }
html[data-theme="light"] .modal, html[data-theme="light"] .bell-panel, html[data-theme="light"] .vz-tip { background: #ffffff; color: #0b1b3a; border: 1.5px solid #7f93b0; box-shadow: 0 12px 32px rgba(11,27,58,.3); }
html[data-theme="light"] .modal h2, html[data-theme="light"] .modal h3, html[data-theme="light"] .modal label, html[data-theme="light"] .modal p, html[data-theme="light"] .modal li, html[data-theme="light"] .bell-panel * { color: #0b1b3a; }
html[data-theme="light"] .modal .hint, html[data-theme="light"] .modal small { color: #3c4f6e; }
html[data-theme="light"] .toast { background: #0b1f3f; color: #fff; }

/* Light side menu */
html[data-theme="light"] .sidenav { background: #ffffff; border: 1.5px solid #7f93b0; box-shadow: 0 2px 8px rgba(11,27,58,.16); backdrop-filter: none; color: #0b1b3a; --muted:#3c4f6e; --text:#0b1b3a; }
html[data-theme="light"] .sidenav a { color: #1d3358; }
html[data-theme="light"] .sidenav a svg, html[data-theme="light"] .sn-t svg { color: #0b5cb8; }
html[data-theme="light"] .sidenav a:hover { background: #eaf2fc; color: #0b1b3a; }
html[data-theme="light"] .sidenav a.on { background: #0b5cb8; color: #fff; }
html[data-theme="light"] .sidenav a.on svg { color: #fff; }
html[data-theme="light"] .sn-t { background: #eaf2fc; color: #0b1b3a; border: 1px solid #b9cde6; }
html[data-theme="light"] .sn-sec b { color: #0b1b3a; }
html[data-theme="light"] .sn-sec { border-bottom-color: #b9cde6; }
html[data-theme="light"] .sn-g.sub > a { border-inline-start-color: #b9cde6; }
html[data-theme="light"] .sn-step { color: #1d3358; }
html[data-theme="light"] .sn-step:hover { background: #eaf2fc; color: #0b1b3a; }
html[data-theme="light"] .sn-step.on { background: #0b5cb8; color: #fff; }
html[data-theme="light"] .sn-step i { background: #d5deeb; color: #0b1b3a; }
html[data-theme="light"] .sn-step.done i { background: #1b6b36; color: #fff; }
html[data-theme="light"] .sn-step.seen i { background: #e6b800; color: #0b1b3a; }
html[data-theme="light"] .sn-sec span { color: #3c4f6e; }
html[data-theme="light"] .sn-step sup { color: #b3261e; }
html[data-theme="light"] .sn-scrim { background: rgba(11,27,58,.5); }
html[data-theme="light"] .sn-step em { background: #d6e8da; color: #14532d; }
html[data-theme="light"] .sn-step.on em { background: #ffffff; color: #0b3d7a; }
html[data-theme="light"] .brand img { content: url("../img/print_company.png"); }
/* Login page only: the platform's own logo (Bonyan). Dark theme uses img/login_logo.png from index.html; light theme swaps in the dark-text version. */
html[data-theme="light"] body.login .brand img { content: url("../img/login_logo_light.png"); }

/* Copyright: bold name in a darker color */
@media (min-width: 900px) { html[data-theme="light"] body.nb .page::before { color: #0b2d5b; font-weight: 700; } html[data-theme="light"] body.nb .page::after { color: #1c3a63; font-weight: 600; } }
@media (max-width: 899px) { html[data-theme="light"] body.nb .page::after { color: #0b2d5b; font-weight: 700; } }
html[data-theme="light"] .login-foot span { color: #0b2a55; font-weight: 400; }
html[data-theme="light"] .login-foot span strong { color: #061a38; font-weight: 600; }
html[data-theme="light"] .login-foot b { color: #1c3a63; }
html[data-theme="light"] .chk-role.on { background: #0b5cb8; border-color: #0b5cb8; color: #fff; }
html[data-theme="light"] .chk-role.on b { background: rgba(255,255,255,.28); color: #fff; }
html[data-theme="light"] .sidenav { scrollbar-width: thin; scrollbar-color: #9cc3ec transparent; }
html[data-theme="light"] body.nb .nb-dev { color: #0b2d5b; }
html[data-theme="light"] body.nb .nb-dev b { color: #061a38; font-weight: 600; }
@media (min-width: 900px) { html[data-theme="light"] body.nb .nb-dev .nb-dev-c { color: #1c3a63; font-weight: 600; } }

.mig-list{margin:0 0 .6rem;padding-inline-start:1.1rem}.mig-list li{margin:.35rem 0}
.dash{margin-bottom:var(--ds-space-3,12px)}.dash .stats{margin-bottom:.8rem}.dash-tile{text-decoration:none;color:inherit}
.dash-alerts{list-style:none;margin:0;padding:0}.dash-alerts li{padding:.45rem .2rem;border-bottom:1px solid rgba(255,255,255,.08)}.dash-alerts li:last-child{border:0}
.dash-alerts a{color:inherit;text-decoration:none}.dash-alerts li.red{border-inline-start:3px solid #e5484d;padding-inline-start:.6rem}.dash-alerts li.orange{border-inline-start:3px solid #f5a623;padding-inline-start:.6rem}

.dash-new{display:block;text-align:center;font-size:1.15rem;padding:.95rem 1rem;margin:.2rem 0 .8rem;text-decoration:none}
.pwa-bar{position:fixed;inset-inline:12px;bottom:12px;z-index:60;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;padding:.7rem .9rem}.pwa-bar span{flex:1;min-width:12rem}

.dash-strip{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 .8rem}
.dash-chip{flex:1;min-width:8.5rem;display:flex;align-items:center;gap:.55rem;padding:.45rem .8rem;border-radius:999px;background: var(--b-tray-bg);border: 1px solid var(--b-chip-bd);color:inherit;text-decoration:none;font-size:.9rem}
.dash-chip b{font-size:1.15rem;min-width:1.4rem;text-align:center}
.dash-chip.ok b{color: var(--b-ok);}
.dash-chip.ok { border-color: var(--b-ok-bd); }
.dash-chip.warn{border-color: var(--b-warn-bd);}.dash-chip.warn b{color: var(--b-warn);}.dash-chip.bad{border-color: var(--b-bad-bd);}.dash-chip.bad b{color: var(--b-bad);}

.dash-lbl{font-weight:700;font-size:.85rem;color:#cfe0ff;display:flex;align-items:center;white-space:nowrap}
.dash .dash-lbl{margin-bottom:.4rem}
/* Home: shorter glass box (logos at size) and larger project images so everything shows without scrolling */
@media (min-width:900px){
  body:has(#pjStrip) .menu.home-grid{gap:10px 18px}
  body:has(#pjStrip) .menu.home-grid .menu-card{padding:9.5px 18px;min-height:0}
  body:has(#pjStrip) .brand{display:none}
  body:has(#pjStrip) .dash-strip{margin-bottom:.5rem}
  body:has(#pjStrip) .dash-chip{padding:.25rem .7rem}
  body:has(#pjStrip) .pj-strip{margin-top:12px}
  body:has(#pjStrip) .pj-head{margin-bottom:4px}
}

.dash-wrap{position:relative;flex:1;min-width:8.5rem;display:flex}.dash-wrap .dash-chip{flex:1}
.dash-pop{display:none;position:absolute;top:100%;inset-inline:0;z-index:50;padding-top:6px}
.dash-pop>a,.dash-pop>small{display:block;padding:.45rem .8rem;background:#12284f;border:1px solid rgba(255,255,255,.18);border-top:0;color:#fff;text-decoration:none;font-size:.85rem}
.dash-pop>a:first-child{border-top:1px solid rgba(255,255,255,.18);border-radius:10px 10px 0 0}
.dash-pop>a:hover{background:#1d3d75}
.dash-pop>:last-child{border-radius:0 0 10px 10px}.dash-pop>small{color:#9fb3d4}
.dash-wrap:hover .dash-pop,.dash-wrap:focus-within .dash-pop{display:block}
html[data-theme="light"] .dash-pop>a,html[data-theme="light"] .dash-pop>small{background:#fff;color:#0b1b3a;border-color:#9cb2d0}
@media (min-width:900px){body:has(#pjStrip) #dash{margin-top:8px}}
.dash-strip>.dash-lbl{padding:.3rem .9rem;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#fff}
@media (min-width:900px){body:has(#pjStrip) .alert-ticker{margin-inline:0}}
.dash-arr{font-style:normal;font-size:.7rem;margin-inline-start:.5rem;opacity:.85}
.dash-arr3d{flex:none;width:20px;height:30px;align-self:center;filter:drop-shadow(0 3px 2px rgba(0,0,0,.55)) drop-shadow(0 0 4px rgba(120,180,255,.45))}
.dash-strip{align-items:center}
@media (min-width:900px){body:has(#pjStrip) #dash,body:has(#pjStrip) .alert-ticker{width:100%;box-sizing:border-box;max-width:1040px;margin-inline:auto}}
@media (min-width:1100px){body:has(#pjStrip) #dash,body:has(#pjStrip) .alert-ticker{max-width:1240px}}
@media (min-width:1200px){body:has(#pjStrip) #dash,body:has(#pjStrip) .alert-ticker{max-width:1480px}}

.dash-pages{flex:1;min-width:0}.dash-page{display:none;gap:.5rem}.dash-page.on{display:flex}
.dash-nav{flex:none;width: var(--b-ic-sm);height: var(--b-ic-sm);border-radius: var(--b-r-sm);border: 1px solid var(--b-neutral-bd);background: var(--b-neutral-bg);color: var(--b-neutral-ink);font-size: 18px;line-height:1;cursor:pointer}
.dash-nav:hover{background: var(--b-hover-bg);}
.dash-dots{display:flex;gap:6px;justify-content:center;margin:-.3rem 0 .4rem}.dash-dots i{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.3)}.dash-dots i.on{background:#7fb4ff}

/* Report photos (optional) */
.ph-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, rgba(255,255,255,.18)); }
.ph-head { margin-bottom: 8px; }
.ph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ph-list:empty { display: none; }
.ph-it { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.06); }
.ph-it img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-x { position: absolute; top: 4px; inset-inline-start: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }

/* Share feature closed (screen and feature permissions) */
html[data-no-share] [data-share], html[data-no-share] #btnShare, html[data-no-share] #btnShareTg { display: none !important; }

/* Systems cards + feature rows in the permissions screen */
.ad-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.ad-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: transform .15s; }
.ad-card:hover { transform: translateY(-2px); }
.ad-card b { font-size: 16px; } .ad-card span { font-size: 13px; opacity: .8; }
body.page-v2 .pm-t td.pm-fn { padding-inline-start: 40px; font-size: .94em; }

/* Mobile: quick-shortcut cards wrap into two rows instead of overflowing */
.dash-page.on { flex-wrap: wrap; }
@media (max-width: 700px) {
  .dash-wrap { flex: 1 1 calc(50% - .25rem); min-width: 0; }
  .dash-wrap .dash-chip { min-width: 0; }
  .dash-strip { flex-wrap: wrap; }
  .dash-pages { flex: 1 1 100%; order: 3; }
  .dash-arr3d { display: none; }
}

/* Mobile: a closed side menu does not widen the page */
html, body { overflow-x: clip; max-width: 100%; }
@media (max-width: 899px) {
  .sidenav { visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  body.sn-open .sidenav { visibility: visible; transition: transform .2s; }
}

/* Mobile: top bar and "Required now" card wrap instead of clipping the bell and button */
@media (max-width: 899px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar #userBar { flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
  body.page-v2 .um-btn { max-width: 100%; }
  .td-box summary { flex-wrap: wrap; row-gap: 8px; }
  .td-box .td-new { flex: 0 1 auto; }
}
@media (max-width: 700px) { .us-tools { flex-wrap: wrap; } .us-tools input { flex: 1 1 100%; min-width: 0; } }
.ls-row:has(.ls-kind) { grid-template-columns: 28px 1fr minmax(96px, 150px) auto auto auto; }
.ls-kind { margin: 0; }
.oo-box { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.04); }
.oo-box h4 { margin: 0 0 8px; }
.oo-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.oo-item:first-of-type { border-top: 0; }
.oo-main { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.oo-main small { display: block; color: var(--muted); }
.oo-act { display: flex; gap: 6px; flex-wrap: wrap; }
.oo-item.done .oo-main { opacity: .7; }
.obs-dates { color: var(--muted); font-size: 13px; }
.obs-dates b { color: #fff; font-weight: 700; }
.obs-stale { color: #f5b46a; font-size: 13px; }
@media (max-width: 640px) {
  .ls-row:has(.ls-kind) { grid-template-columns: 28px 1fr auto auto auto; }
  .ls-row:has(.ls-kind) .ls-kind { grid-column: 2 / -1; grid-row: 2; }
}

/* Alerts strip shows only at the top of the page (it scrolls away with the page, never floats over content) */
html body .alert-ticker { position: static; background-color: #3a2a3f; }
html[data-theme="light"] body .alert-ticker { background-color: #fbe3dd; }

.proj-tabs { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.proj-tabs button { background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); color: var(--ds-text-2, #cbd5e1); border-radius: 10px; padding: 8px 16px; font: inherit; font-size: 13px; cursor: pointer; font-weight: 600; }
.proj-tabs button.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); color: var(--b-sel-ink); font-weight: 700; }
.row.is-closed { opacity: .78; }
.pj-state { font-style: normal; font-weight: 700; color: #ffcc80; }
.row-actions button.shut { color: var(--b-warn); border-color: var(--b-warn-bd); background: transparent; }html[data-theme="light"] .pj-state, html[data-theme="light"] .row-actions button.shut { color: #8a5a00; }

.pm-sel { min-width: 200px; padding: 8px 12px; border-radius: 10px; font: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.pm-sel option { background: #0f1f3d; color: #fff; }
.pm-t.pm-one { max-width: 760px; margin: 0 auto; }
.pm-t.pm-one td:first-child { width: auto; }
html[data-theme="light"] .pm-sel { background: rgba(11,27,58,0.072); border-color: rgba(60,80,120,0.51); color: #0b1b3a; }
.pm-t.pm-one th:last-child, .pm-t.pm-one td:last-child { width: 110px; }
html[data-theme="light"] .pm-sel option { background: #fff; color: #0b1b3a; }

/* Group list: the group name is the headline, the user count is secondary */
body.page-v2 .us-list.grpl .us-row.grp .us-role { font-size: 1.2rem; font-weight: 800; padding: 6px 16px; color: #fff; border-width: 2px; border-color: var(--ds-primary); background: rgba(63, 169, 245, 0.18); }
body.page-v2 .us-list.grpl .us-row.grp .us-main b { font-size: var(--ds-small); font-weight: 600; color: var(--ds-text-2); }
html[data-theme="light"] body.page-v2 .us-list.grpl .us-row.grp .us-role { color: #00376b; background: rgba(0, 120, 212, 0.12); }

/* Row action buttons in drawings tables */
.ra-act .btn.small { margin-inline: 3px; text-decoration: none; }
.ra-act { white-space: nowrap; }
body.page-v2 .btn.danger, .d3 .btn.danger, .ra-act .btn.danger { background: linear-gradient(180deg, var(--b-d1), var(--b-d2)); border-color: rgba(255,160,160,.5); color: #fff; }
.drw-to { display: grid; gap: 8px; }
.drw-to .us-checks { max-height: 190px; overflow: auto; }
.drw-grp { display: flex; flex-wrap: wrap; gap: 8px; }
/* قائمة «المزيد» في شاشة المخططات */
.glass:has(.drw-menu), .glass:has(.drw-menu) .controls { overflow: visible; position: relative; z-index: 6; }
.drw-menu { position: relative; display: inline-block; }
.drw-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.drw-menu > summary::-webkit-details-marker { display: none; }
.drw-menu-list { position: absolute; z-index: 40; inset-inline-end: 0; top: calc(100% + 6px); min-width: 210px; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--ds-border, rgba(255,255,255,.28)); border-radius: 12px; background: var(--ds-surface, #0d1f45); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.drw-menu-list .btn { width: 100%; justify-content: flex-start; text-align: start; }
.drw-dd { border: 1px solid var(--ds-border, rgba(255,255,255,.28)); border-radius: 10px; background: rgba(255,255,255,.04); }
.drw-dd > summary { cursor: pointer; padding: 10px 12px; list-style: none; }
.drw-dd > summary::-webkit-details-marker { display: none; }
.drw-dd[open] > summary { border-bottom: 1px solid var(--ds-border, rgba(255,255,255,.2)); }
.drw-dd-p { padding: 8px; display: grid; gap: 8px; }
.drw-dd-l { max-height: 200px; overflow: auto; display: grid; gap: 4px; }
.drw-dd-l label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
html[data-theme="light"] .drw-dd { background: rgba(11,27,58,.04); border-color: rgba(60,80,120,.35); }
.drw-dd-l { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.drw-dd-l label { background: transparent; } .drw-dd-l input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 0; }
.upd-bar { position: fixed; z-index: 9999; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #0b1b3a; color: #fff; border: 1px solid rgba(120,160,220,.45); box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 14px; }
.upd-bar span { flex: 1; }
.upd-bar button { font: inherit; font-weight: 700; border: 0; border-radius: 10px; cursor: pointer; padding: 7px 14px; }
.upd-bar .upd-go { background: linear-gradient(180deg, var(--b-g1), var(--b-g2)); color: #fff; }
.upd-bar .upd-x { background: transparent; color: var(--b-neutral-ink); padding: 7px 8px; }
@media print { .upd-bar { display: none; } }
@media (max-width: 899px) {
  .um-name { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.home .topbar { flex-wrap: nowrap; }
  body.home .topbar #userBar { flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; }
  body.home .topbar .um { min-width: 0; flex: 0 1 auto; }
}
.upd-bar + .upd-bar { bottom: 74px; }
@media (max-width: 899px) { body.nb .topbar { position: relative; z-index: 40; } }
.pm-t.pm-one th > span { display: block; margin-top: 4px; }
.pm-t.pm-one td[colspan] { text-align: start; }
.pm-t.pm-one { min-width: 600px; } .pm-t.pm-one td:first-child, .pm-t.pm-one th:first-child { min-width: 190px; }
.pm-t.pm-one { min-width: 680px; }

/* ===== إمداد: قسم المخزن (المواد والأنواع والحركات) ===== */
.wh-chk { display: inline-flex; align-items: center; gap: 6px; color: var(--ds-text-2); font-size: var(--ds-secondary); cursor: pointer; }
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--ds-space-3); }
.wh-card { display: flex; gap: var(--ds-space-3); align-items: flex-start; background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-lg); padding: var(--ds-space-3); }
.wh-card.low { border-color: var(--ds-warning); }
.wh-thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: var(--ds-radius-md); overflow: hidden; background: var(--ds-surface-row); color: var(--ds-primary); display: flex; align-items: center; justify-content: center; }
.wh-thumb.big { width: 84px; height: 84px; }
.wh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wh-ic { width: 38px; height: 38px; }
.wh-ic.big { width: 50px; height: 50px; }
.wh-body { flex: 1 1 auto; min-width: 0; }
.wh-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wh-name { font-size: var(--ds-card-title); }
.wh-sub { color: var(--ds-text-2); font-size: var(--ds-secondary); margin-top: 2px; }
.wh-qty { font-size: var(--ds-number); font-weight: 700; line-height: 1.2; margin-top: 4px; }
.wh-qty small { font-size: var(--ds-small); font-weight: 400; color: var(--ds-text-2); }
.wh-badge { font-style: normal; font-size: var(--ds-small); color: #1b1400; background: var(--ds-warning); border-radius: var(--ds-radius-sm); padding: 1px 6px; }
.wh-card .row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wh-mv.in { color: var(--ds-success); } .wh-mv.out { color: var(--ds-warning); }
.wh-warn { color: var(--ds-warning); }
.wh-kind { font-style: normal; font-size: var(--ds-small); border-radius: var(--ds-radius-sm); padding: 1px 8px; border: 1px solid var(--ds-border); }
.wh-kind.in { color: var(--ds-success); border-color: var(--ds-success); }
.wh-kind.out { color: var(--ds-warning); border-color: var(--ds-warning); }
.wh-more { border: 0; background: none; color: var(--ds-text-2); cursor: pointer; font-size: var(--ds-secondary); }
.wh-mdet td { background: var(--ds-surface-row); color: var(--ds-text-2); font-size: var(--ds-secondary); }
.wh-imgprev { display: flex; align-items: center; gap: var(--ds-space-3); margin: 0 0 var(--ds-space-3); }
.wh-icwrap { color: var(--ds-primary); }
.wh-ic-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.wh-ic-pick button { width: var(--b-ic); height: var(--b-ic); border-radius: var(--b-r); border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-info); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.wh-ic-pick button.on { border-color: var(--b-sel-bd); background: var(--b-sel-bg); }
.wh-bar .chk-roles { margin: 0; }
.wh-bar .us-tools { flex-wrap: wrap; justify-content: flex-end; }
.wh-bar .us-filters { display: flex; align-items: center; gap: var(--ds-space-2); flex-wrap: wrap; }
.wh-bar .us-filters select, #whMoveBar select { height: 32px; padding: 0 var(--ds-space-3); border-radius: var(--ds-radius-sm); font-size: var(--ds-secondary); max-width: 190px; }
#whMoveBar { display: flex; align-items: center; gap: var(--ds-space-2); flex-wrap: wrap; margin-bottom: var(--ds-space-3); }

/* ===== حلقة تركيز موحّدة (V7.9.3.7) ===== */
:where(a, button, summary, input, select, textarea, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid var(--b-focus);
  outline-offset: 2px;
}
@media (max-width: 600px) { .stats.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) {
  /* صور المخزن: صورة مربعة 84px جنب النص بدل ما تاخد عرض الكارت كامل × 110px (V7.9.3.9) */
  .wh-grid { grid-template-columns: 1fr; }
  .wh-card { flex-direction: row; }
  .wh-thumb, .wh-thumb.big { width: 84px; height: 84px; }
  .wh-ic, .wh-ic.big { width: 56px; height: 56px; }
}

/* V7.9.4.24 users and permissions screens: roles + last login on the card, suspended accounts, account box, unsaved-changes bar, user preview, change log */
body.page-v2 .us-hd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: start; }
body.page-v2 .us-head .us-hd b { flex: none; }
body.page-v2 .us-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--ds-space-2); font-size: var(--ds-small); }
body.page-v2 .us-meta .us-roles { grid-column: auto; grid-row: auto; justify-content: flex-start; }
body.page-v2 .us-off { font-style: normal; font-size: var(--ds-small); font-weight: 700; padding: 1px 8px; border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-danger); color: var(--ds-danger); white-space: nowrap; }
body.page-v2 .us-card.off { border-inline-start-color: var(--ds-danger); opacity: .8; }
body.page-v2 .us-acct { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-2); padding: 8px var(--ds-space-3); margin-bottom: 12px; border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-success); border-radius: var(--ds-radius-md); background: var(--ds-surface-row); }
body.page-v2 .us-acct.off { border-inline-start-color: var(--ds-danger); }
body.page-v2 .us-acct > span:first-child { display: flex; flex-direction: column; gap: 2px; }
body.page-v2 .us-acct-btns { display: flex; flex-wrap: wrap; gap: 6px; }
body.page-v2 .pm-top { justify-content: space-between; }
body.page-v2 .pm-dirty { font-size: var(--ds-small); color: var(--ds-success); white-space: nowrap; }
body.page-v2 .pm-dirty.on { color: var(--ds-warning); font-weight: 700; }
body.page-v2 .pv-who { gap: var(--ds-space-2) var(--ds-space-3); }
body.page-v2 .pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--ds-space-2); align-items: start; }
body.page-v2 .pv-sec { margin: 0; }
body.page-v2 .pv-sec.none { opacity: .55; }
body.page-v2 .pv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--ds-border); }
body.page-v2 .pv-row > .pv-n { flex: 1 1 140px; }
body.page-v2 .pv-row > .pv-f { flex: 1 1 100%; }
body.page-v2 .pv-sec > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; font-size: var(--ds-card-title); }
body.page-v2 .pv-sec > summary::-webkit-details-marker { display: none; }
body.page-v2 .pv-sec > summary::after { content: "▾"; opacity: .7; transition: transform .15s; }
body.page-v2 .pv-sec:not([open]) > summary::after { transform: rotate(90deg); }
body.page-v2 .pv-sec[open] > summary { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--ds-border); }
body.page-v2 .pv-row:last-child { border-bottom: 0; }
body.page-v2 .pv-row > span:first-child { color: var(--ds-success); }
body.page-v2 .pv-row.off > span:first-child { color: var(--ds-text-2); text-decoration: line-through; opacity: .7; }
body.page-v2 .pv-f { display: flex; flex-wrap: wrap; gap: 4px; padding-inline-start: 18px; }
body.page-v2 .pv-f i { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--ds-border); }
body.page-v2 .pv-f i.on { border-color: var(--ds-success); color: var(--ds-success); }
body.page-v2 .pv-f i.off { color: var(--ds-text-2); text-decoration: line-through; opacity: .6; }
body.page-v2 .pm-log { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
body.page-v2 .pm-log details { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); padding: 6px 10px; background: var(--ds-surface-row); }
body.page-v2 .pm-log summary { cursor: pointer; }
body.page-v2 .pm-log ul { margin: 6px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; font-size: var(--ds-small); }
body.page-v2 .pm-log li span { margin-inline-start: 8px; }
body.page-v2 .pm-log .pl-a { color: var(--ds-success); }
body.page-v2 .pm-log .pl-r { color: var(--ds-danger); }

/* V7.9.4.26: Nozom dashboard (admin.html) - number tiles that open their screen + "needs your attention" list */
body.page-v2 .nz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
body.page-v2 .nz-kpi { display: flex; flex-direction: column; gap: 4px; padding: var(--ds-space-3) var(--ds-space-4); border-radius: var(--ds-radius-lg); text-decoration: none; color: var(--ds-text); border-inline-start: 3px solid var(--ds-success); transition: transform .15s, border-color .15s; }
body.page-v2 .nz-kpi.warn { border-inline-start-color: var(--ds-warning); }
body.page-v2 .nz-kpi:hover { transform: translateY(-2px); }
body.page-v2 .nz-kpi span { font-size: var(--ds-secondary); color: var(--ds-text-2); }
body.page-v2 .nz-kpi b { font-size: 30px; font-weight: 700; line-height: 1.1; }
body.page-v2 .nz-kpi small { font-size: var(--ds-small); color: var(--ds-text-3); }
body.page-v2 .nz-kpi.warn small { color: var(--ds-warning); }
body.page-v2 .nz-att ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ds-space-1); }
body.page-v2 .nz-att li > a, body.page-v2 .nz-att li > span { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: 8px var(--ds-space-3); border-radius: var(--ds-radius-sm); background: var(--ds-surface-row); border: 1px solid var(--ds-border); border-inline-start: 3px solid var(--ds-warning); color: var(--ds-text); text-decoration: none; font-size: var(--ds-secondary); }
body.page-v2 .nz-att li > a:hover { border-color: var(--ds-primary); }
body.page-v2 .nz-att li i { font-style: normal; color: var(--ds-text-3); }
@media (max-width: 560px) { body.page-v2 .nz-kpis { grid-template-columns: 1fr 1fr; gap: var(--ds-space-2); } body.page-v2 .nz-kpi b { font-size: 24px; } }
/* V7.9.4.27 perms.html «حسب المستخدم»: where each key comes from, exception marks and buttons */
body.page-v2 .pv-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
body.page-v2 .pv-src { font-size: 11px; color: var(--ds-text-2); }
body.page-v2 .pv-src.ex { color: var(--ds-warning); font-weight: 700; }
body.page-v2 .pv-f .pv-fb { font: inherit; font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--ds-border); background: transparent; color: inherit; cursor: pointer; }
body.page-v2 .pv-f .pv-fb.on { border-color: var(--ds-success); color: var(--ds-success); }
body.page-v2 .pv-f .pv-fb.off { color: var(--ds-text-2); text-decoration: line-through; opacity: .6; }
body.page-v2 .pv-f .pv-fb.ex { border-style: dashed; border-color: var(--ds-warning); opacity: 1; font-weight: 700; }
body.page-v2 .pv-f .pv-fb:disabled { cursor: default; }
body.page-v2 .pv-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 2px; font-size: 11px; opacity: .7; }
body.page-v2 .pv-x:hover { opacity: 1; color: var(--ds-danger, #e5484d); }
body.page-v2 button.us-role.pv-pick { cursor: pointer; font: inherit; }
/* V7.9.4.29 login: box closer to the logo, and room at the bottom so the fixed footer never sits on the box (short screens scroll instead) */
body.login .brand { margin-bottom: 6px; }
body.login .page { padding-bottom: 104px; }
body.login .login-box { max-width: 360px; padding: 16px 20px; }
body.login .login-box .field { margin-bottom: 10px; }
body.login .login-box input { padding-block: 9px; }
body.login .login-box .error:empty { display: none; }
body.login .login-box .forgot-link { margin-top: 10px !important; color: #9cc7ff; }
html[data-theme="light"] body.login .login-box .forgot-link { color: #1d4f91; }
/* V7.9.4.30 Masar board (obstacles.html) */
.ms-card.ms-new { border-inline-start: 3px solid var(--ds-danger, #ff6b6b); }
.ms-card .ms-dept { color: inherit; }
.ms-card .ms-note { background: rgba(120, 160, 220, .10); border-radius: 8px; padding: 4px 8px; }
.ms-log { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.ms-card.ms-late { box-shadow: 0 0 0 1px var(--ds-danger, #ff6b6b) inset; }

/* V7.9.4.51 استغلال المساحة: البطاقات والرسم في صف واحد */
.st-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 12px; }
body .st-row > .stats { flex: 1 1 380px; margin: 0; align-content: stretch; }
body .st-row > .panel { flex: 1 1 340px; margin: 0; display: flex; align-items: center; justify-content: center; }
body .st-row > .panel > .chart { width: 100%; }
@media (min-width: 900px) { body .st-row:has(> .panel:not([style*="display: none"]):not([style*="display:none"])) > .stats:not(.three) { grid-template-columns: repeat(2, 1fr); } }
/* مسار: الرسم + البحث والتاريخ في صف واحد */
.ms-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.ms-row > .ac-box { flex: 1 1 340px; margin: 0; display: flex; align-items: center; justify-content: center; }
.ms-row > .ac-box > .chart { width: 100%; }
.ms-row > .ms-side { flex: 1 1 340px; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.ms-side input[type="search"] { width: 100%; }
.ms-side .ms-dates { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-side .ms-dates label { flex: 1 1 140px; display: flex; flex-direction: column; gap: 4px; }
.ms-tabs { margin: 0 0 10px; }

/* V7.9.4.53 unified buttons: 4 colours only (blue save/add, green export, grey cancel, red delete) on every page and theme.
   .d3 .btn used to override ghost/warn; body.page-v2 .btn used to make .small 15px. */
html .btn.ghost:not(.danger):not(.green) { background: var(--b-neutral-bg); border: 1px solid var(--b-neutral-bd); color: var(--b-neutral-ink); box-shadow: none; text-shadow: none; }
html .btn.ghost:not(.danger):not(.green):hover:not(:disabled) { background: var(--b-hover-bg); border-color: var(--b-sel-bd); filter: none; }
.d3 .btn.warn, body.page-v2 .btn.warn { background: linear-gradient(180deg, var(--b-w1), var(--b-w2)); border-color: rgba(255,220,150,.55); color: #3a2a00; text-shadow: none; }
.d3 .btn.green, body.page-v2 .btn.green { background: linear-gradient(180deg, var(--b-g1), var(--b-g2)); color: #fff; }
body.page-v2 .btn.small, .d3 .btn.small { font-size: 13px; }

/* V7.9.4.53 one tab style for every tab bar (.tabs, .ap-tabs, .proj-tabs, .seg, .chk-role): same pill, same selected state.
   Selected = blue border + light fill, never the solid blue of the save button. */
html .tabs button, html .ap-tabs button, html .proj-tabs button, html .seg button, html .chk-role {
  padding: 8px 16px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--ds-text-2, #cbd5e1); background: var(--b-tray-bg); border: 1px solid var(--b-tray-bd); box-shadow: none;
}
html .tabs button.on, html .ap-tabs button.on, html .proj-tabs button.on, html .seg button.on, html .chk-role.on {
  color: var(--b-sel-ink); background: rgba(63,169,245,.20); border-color: rgba(63,169,245,.75); font-weight: 700;
}
html .seg { display: inline-flex; flex-wrap: wrap; gap: 8px; border: 0; border-radius: 0; overflow: visible; background: none; }
html[data-theme="light"] .tabs button.on, html[data-theme="light"] .ap-tabs button.on, html[data-theme="light"] .proj-tabs button.on,
html[data-theme="light"] .seg button.on, html[data-theme="light"] .chk-role.on { background: #e3eefb; border-color: #0b5cb8; color: #0b3d7a; }
html[data-theme="light"] .chk-role.on b { background: rgba(11,92,184,.14); color: #0b3d7a; }

/* Pagination (data-pg in common.js): 10 items per page */
.pg-off { display: none !important; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.pager button { font: inherit; font-size: 14px; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); }
.pager button:hover:not(:disabled) { background: var(--b-hover-bg); border-color: var(--b-sel-bd); }
.pager button.on { background: var(--b-sel-bg); border-color: var(--b-sel-bd); color: var(--b-sel-ink); font-weight: 700; }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .pg-gap { padding: 0 4px; color: var(--muted); }
.pager .pg-cnt { font-size: 13px; color: var(--muted); margin-inline-start: 10px; }
.pager .pg-ar { display: none; font-size: 20px; line-height: 1; }
html[dir="ltr"] .pager .pg-ar { transform: scaleX(-1); }
html[data-theme="light"] .pager button.on { background: #e3eefb; border-color: #0b5cb8; color: #0b3d7a; }
@media (max-width: 600px) {
  .pager .pg-tx { display: none; }
  .pager .pg-ar { display: inline-block; }
  .pager button { min-width: 34px; height: 34px; padding: 0 8px; }
  .pager .pg-cnt { flex-basis: 100%; text-align: center; margin: 4px 0 0; }
}
@media print { .pg-off { display: revert !important; } .pager { display: none !important; } }

/* Drawings table: compact action buttons */
.drw-table .ra-act { white-space: nowrap; }
body .drw-table .ra-act .btn.small { padding: 4px 10px; font-size: 12px; min-height: 0; line-height: 1.4; margin: 2px; }
.ack-hover { cursor: pointer; }
.ack-pop { position: fixed; z-index: 60; max-width: 280px; line-height: 1.8; pointer-events: none; }

/* V7.9.4.56 سند ← تحليل الأداء المالي */
.sn-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.sn-2 > .panel { margin: 0; }
.sn-ins { margin: 0; padding-inline-start: 18px; line-height: 1.8; }
.modal .sn-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
/* V7.9.4.57 سند: data formatting panel */
.sn-fmt > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; }
.sn-fmt > summary::-webkit-details-marker { display: none; }
.sn-fmt > summary::before { content: "▸"; color: var(--muted); }
.sn-fmt[open] > summary::before { content: "▾"; }
.sn-fmt[open] > summary { margin-bottom: 10px; }
.sn-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.sn-map label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sn-map select { width: 100%; margin: 0; }

/* V7.9.4.58: users + permissions in one screen (users.html) */
body.page-v2 .us-list.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-2); align-items: start; }
@media (max-width: 1000px) { body.page-v2 .us-list.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { body.page-v2 .us-list.three { grid-template-columns: 1fr; } }
body.page-v2 .us-list.three .us-head { cursor: default; padding-bottom: 4px; }
body.page-v2 .us-list.three .us-body { padding-top: 0; }
body.page-v2 .us-list.three .us-body small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.page-v2 .us-acts { display: flex; gap: var(--ds-space-2); }
body.page-v2 .us-acts .btn { width: auto; margin: 0; }
body.page-v2 .pm-tools { flex-wrap: wrap; flex: 1; min-width: 0; }
body.page-v2 .pm-tools .btn { width: auto; margin: 0; }
body.page-v2 .pm-tools input { width: 220px; }
.pm-more { position: relative; }
.pm-more > summary { list-style: none; cursor: pointer; }
.pm-more > summary::-webkit-details-marker { display: none; }
.pm-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 4px); z-index: 6; min-width: 180px; display: flex; flex-direction: column; padding: 4px; background: rgba(20,30,54,.98); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.pm-menu button { background: none; border: 0; color: var(--ds-text); font: inherit; font-size: var(--ds-secondary); text-align: start; padding: 7px 10px; border-radius: var(--ds-radius-sm); cursor: pointer; }
.pm-menu button:hover { background: var(--ds-surface-row-hover); }
.pm-menu button.danger { color: var(--ds-danger); }
html[data-theme="light"] .pm-menu { background: #ffffff; border-color: #7f93b0; box-shadow: 0 8px 24px rgba(11,27,58,.2); }
.pm-explicit { margin: 0 0 10px; }
.pm-mem { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; }
.pm-mrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--ds-border); }
.pm-madd { margin-top: 10px; }
.pm-madd select { width: 100%; }
.modal-backdrop.pv-modal { z-index: 20; }
body:has(#pvModal.open) #reportModal { z-index: 21; }
.pv-modal .modal { max-width: 1100px; }
body.page-v2 .pm-tools select.pm-sel { width: auto; flex: 0 0 auto; max-width: 100%; }

/* Permissions tab bar: every control in one row (V7.9.4.62) */
@media (min-width: 1101px) {
  body.page-v2 .pm-top { flex-wrap: nowrap; gap: var(--ds-space-2); }
  body.page-v2 .pm-top .us-tools { gap: 6px; flex-wrap: nowrap; }
  body.page-v2 .pm-top .btn.small { padding: 5px 10px; font-size: 12px; }
  body.page-v2 .pm-top .pm-sel { min-width: 150px; padding: 5px 10px; font-size: 13px; }
  body.page-v2 .pm-top .us-tools input { width: 180px; height: 30px; }
  body.page-v2 .pm-top .pm-dirty { font-size: 12px; white-space: nowrap; }
}

/* Permissions group picker: fixed-height list with a scroll bar */
.pm-dd { position: relative; }
.pm-dd-btn { position: relative; text-align: start; cursor: pointer; padding-inline-end: 30px !important; white-space: nowrap; }
.pm-dd-btn::after { content: "▾"; position: absolute; inset-inline-end: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .8; }
.pm-dd-list::-webkit-scrollbar { width: 8px; }
.pm-dd-list::-webkit-scrollbar-thumb { background: rgba(140,170,220,.55); border-radius: 8px; }
.pm-dd-list::-webkit-scrollbar-track { background: transparent; }
.pm-dd-list { position: absolute; inset-inline-start: 0; top: calc(100% + 4px); z-index: 20; min-width: 100%; width: max-content; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; padding: 4px; background: rgba(20,30,54,.98); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.pm-dd-list[hidden] { display: none; }
.pm-dd-list button { background: none; border: 0; color: var(--ds-text); font: inherit; font-size: 13px; text-align: start; padding: 7px 12px; border-radius: var(--ds-radius-sm); cursor: pointer; white-space: nowrap; }
.pm-dd-list button:hover { background: var(--ds-surface-row-hover); }
.pm-dd-list button.on { background: #1f6fd1; color: #fff; }
.pm-dd-list .pm-dd-add { color: #6fb1ff; font-weight: 700; }
.pm-dd-list .pm-dd-all { border-bottom: 1px solid var(--ds-border); border-radius: 0; margin-bottom: 4px; }
html[data-theme="light"] .pm-dd-list { background: #fff; border-color: #7f93b0; box-shadow: 0 8px 24px rgba(11,27,58,.2); }
html[data-theme="light"] .pm-dd-list .pm-dd-add { color: #1f5fbf; }

/* V7.9.4.66 Forms management: readable screen links (light + dark) */
body.page-v2 .table a.scr-lnk { color: var(--ds-primary); text-decoration: none; font-weight: 600; }
body.page-v2 .table a.scr-lnk:hover { text-decoration: underline; }
/* V7.9.4.66 RoOt «واجهة الأقسام» */
.hl-tbl td { vertical-align: middle; }
.hl-tbl input { min-width: 120px; width: 100%; }
.hl-img { width: 52px; height: 52px; padding: 4px; border-radius: var(--ds-radius-sm, 10px); border: 1px dashed var(--ds-primary); background: var(--icon-box, transparent); cursor: pointer; }
.hl-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* سند: financial statements (V7.9.4.70) */
.fin-st td:last-child { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-st tr.fin-h td { font-weight: 700; color: var(--muted); padding-top: 12px; }
.fin-st tr.fin-s td { font-weight: 700; border-top: 1px solid rgba(127,127,127,.35); }
.fin-st tr.fin-t td { font-weight: 800; border-top: 2px solid rgba(127,127,127,.55); }
/* V7.9.4.74 permissions, one group: a card per section (header: home card + select all), its own table with an alerts column and a row select-all */
body.page-v2 .pm-cards { display: flex; flex-direction: column; gap: 8px; max-width: 1000px; margin: 0 auto; }
body.page-v2 .pm-card { border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm, 12px); background: rgba(10, 24, 52, .82); overflow: hidden; }
html[data-theme="light"] body.page-v2 .pm-card { background: #ffffff; }
body.page-v2 .pm-ch { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; flex-wrap: wrap; }
body.page-v2 .pm-ch:hover { background: rgba(120, 160, 220, .12); }
body.page-v2 .pm-card.open .pm-ch { border-bottom: 1px solid var(--ds-border); background: rgba(120, 160, 220, .10); }
body.page-v2 .pm-chx { margin-inline-start: auto; display: flex; gap: 16px; align-items: center; }
body.page-v2 .pm-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ds-small); color: var(--ds-text-2); cursor: pointer; white-space: nowrap; font-weight: 400; }
body.page-v2 .pm-lbl input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; margin: 0; }
body.page-v2 .pm-scroll { overflow-x: auto; padding: 2px 10px 8px; }
body.page-v2 .pm-card .pm-t.pm-one { max-width: none; }
body.page-v2 .pm-t.pm-one th:last-child, body.page-v2 .pm-t.pm-one td:last-child { width: 90px; }
body.page-v2 .pm-ntf { white-space: nowrap; }
body.page-v2 .pm-nx { background: none; border: 0; color: var(--ds-text-2); font: inherit; font-size: 12px; cursor: pointer; padding: 0 4px; vertical-align: middle; }
/* V7.9.4.74 users table */
body.page-v2 .us-twrap { overflow-x: auto; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm, 12px); background: rgba(10, 24, 52, .82); }
html[data-theme="light"] body.page-v2 .us-twrap { background: #ffffff; }
body.page-v2 .us-t { width: 100%; border-collapse: collapse; font-size: var(--ds-secondary, 14px); min-width: 900px; }
body.page-v2 .us-t th { position: sticky; top: 0; font-size: var(--ds-small); color: var(--ds-text-2); text-align: start; padding: 9px 10px; white-space: nowrap; border-bottom: 1px solid var(--ds-border); cursor: pointer; user-select: none; background: rgba(120, 160, 220, .12); }
body.page-v2 .us-t th.on { color: var(--ds-text); }
body.page-v2 .us-t th:last-child { cursor: default; }
body.page-v2 .us-t td { padding: 7px 10px; border-bottom: 1px solid var(--ds-border); vertical-align: middle; }
body.page-v2 .us-t tbody tr { cursor: pointer; border-inline-start: 3px solid transparent; }
body.page-v2 .us-t tbody tr:hover td { background: var(--ds-surface-row-hover, rgba(120, 160, 220, .10)); }
body.page-v2 .us-t tr.stale td:first-child { box-shadow: inset -3px 0 0 var(--ds-warning); }
body.page-v2 .us-t tr.off td { opacity: .6; }
body.page-v2 .us-t .us-tn { font-weight: 700; white-space: nowrap; }
body.page-v2 .us-t .us-te, body.page-v2 .us-t .us-tu { font-size: var(--ds-small); color: var(--ds-text-2); white-space: nowrap; text-align: end; }
body.page-v2 .us-t .us-tc .us-code { margin: 0; }
body.page-v2 .us-t .us-ts, body.page-v2 .us-t .us-ta { white-space: nowrap; }
body.page-v2 .us-t .us-ts i { font-style: normal; font-size: var(--ds-small); }
body.page-v2 .us-t .us-ta .btn { width: auto; margin: 0 0 0 6px; }
body.page-v2 .us-t .us-roles, body.page-v2 .us-t .us-projs { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 760px) {
  body.page-v2 .us-t .us-tn { position: sticky; right: 0; z-index: 1; background: #0e2147; }
  html[data-theme="light"] body.page-v2 .us-t .us-tn { background: #ffffff; }
  html[dir="ltr"] body.page-v2 .us-t .us-tn { right: auto; left: 0; }
}
/* V7.9.4.74 RoOt «الإعدادات»: my account beside the admins */
body.page-v2 .st-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: var(--ds-space-3); align-items: start; }
body.page-v2 .st-who { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
body.page-v2 .st-name { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
body.page-v2 .st-me .actions { margin-top: 10px; justify-content: flex-start; }
body.page-v2 .st-me .actions .btn { width: auto; }
body.page-v2 .st-t td { vertical-align: middle; }
@media (max-width: 860px) { body.page-v2 .st-grid { grid-template-columns: 1fr; } }
/* V7.9.4.74 RoOt «الأقسام»: switch + order per card */
body.page-v2 .hl-bar { margin-bottom: var(--ds-space-2); }
body.page-v2 .hl-bar .btn { width: auto; }
.hl-tbl tr.hl-off td { opacity: .5; }
.hl-tbl tr.hl-off td:nth-child(2) { opacity: 1; }
.hl-ord { white-space: nowrap; }
.hl-mv { background: none; border: 1px solid var(--ds-border); color: var(--ds-text); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; margin: 1px; font-size: 11px; }
.hl-mv:disabled { opacity: .3; cursor: default; }
.hl-sw { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.hl-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.hl-sw span { position: absolute; inset: 0; border-radius: 22px; background: rgba(150, 160, 180, .45); transition: .2s; }
.hl-sw span::before { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; inset-inline-start: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.hl-sw input:checked + span { background: var(--ds-success); }
.hl-sw input:checked + span::before { transform: translateX(-18px); }
html[dir="ltr"] .hl-sw input:checked + span::before { transform: translateX(18px); }
.hl-sw input:focus-visible + span { outline: 2px solid var(--ds-primary); }
/* V7.9.4.74 project states: paused yellow, done gray */
.row.is-paused .pj-state { color: var(--ds-warning, #ffcc80); }
.row.is-done { opacity: .62; }
.row.is-done .pj-state { color: var(--ds-text-2, #9aa7bd); }
.row .pj-setup { text-decoration: underline dotted; cursor: pointer; }

/* Screen not allowed (V7.9.4.75): the side menu of that section is hidden */
html[data-noaccess] #sidenav { display: none !important; }

/* Technical office «حساب مسطحات» (V7.9.4.77) */
.ar-table input:not([type=checkbox]), .ar-table select { width: 100%; min-width: 70px; padding: 4px 6px; }
.ar-table td:nth-child(2) input { min-width: 180px; }
.ar-table td:nth-child(10) input { min-width: 140px; }
.ar-table tfoot td { background: rgba(255,255,255,.04); }

/* License note (V7.9.4.86) */
.lic-note { margin: 8px 0; padding: 8px 14px; border-radius: 12px; font-size: 13px; background: rgba(245,166,35,.16); border: 1px solid rgba(245,166,35,.45); }
.lic-note.lic-end { background: rgba(229,72,77,.16); border-color: rgba(229,72,77,.5); }
.lic-note { display: flex; align-items: center; gap: 10px; }
.lic-note .lic-t { flex: 1; min-width: 0; }
.lic-note .lic-x { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: inherit; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
@media (max-width: 899px) {
  .lic-note { padding: 6px 10px; font-size: 12px; }
  .lic-note .lic-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
  .lic-note.open .lic-t { white-space: normal; }
}
.ac-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.ac-row input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; cursor: pointer; }

/* Warehouse (V7.9.4.91): voided movements */
.wh-badge.rev { background: transparent; color: var(--ds-text-2, #cbd5e1); border: 1px solid var(--ds-border); }
.wh-mrow.voided td:not(:last-child) { text-decoration: line-through; opacity: .6; }
.wh-void { font: inherit; font-size: var(--ds-small); padding: 4px 10px; border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-border); background: transparent; color: var(--ds-text-2, #cbd5e1); cursor: pointer; }
.wh-void:hover { border-color: var(--ds-warning); color: var(--ds-text, #fff); }

/* Warehouse (V7.9.4.92): shortage strip, level bars, mobile action bar, image upload */
.wh-short { display: flex; width: 100%; align-items: center; gap: var(--ds-space-2); margin: 0 0 var(--ds-space-3); padding: 9px 14px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-warning); background: transparent; color: var(--ds-text, #fff); font: inherit; cursor: pointer; text-align: start; }
.wh-short.on, .wh-short:hover { background: rgba(245, 166, 35, .14); }
.wh-badge.out { background: var(--ds-danger, #e5484d); color: #fff; }
.wh-lvl { height: 6px; border-radius: 3px; background: var(--ds-border); margin-top: 6px; overflow: hidden; }
.wh-lvl i { display: block; height: 100%; border-radius: 3px; }
.wh-lvl.ok i { background: var(--ds-success); } .wh-lvl.low i { background: var(--ds-warning); } .wh-lvl.out i { background: var(--ds-danger, #e5484d); }
.wh-mchart { margin: 0 0 var(--ds-space-3); }
.wh-upl { display: flex; align-items: center; gap: var(--ds-space-2); flex-wrap: wrap; margin-bottom: 6px; }
#whMFind { margin-bottom: 6px; width: 100%; }
#whMItem { width: 100%; }
.wh-fab { display: none; }
@media (max-width: 700px) {
  .wh-fab { display: flex !important; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; gap: var(--ds-space-2); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--ds-surface, #0f1b34); border-top: 1px solid var(--ds-border); }
  .wh-fab .btn { flex: 1; min-height: 46px; font-size: var(--ds-body, 16px); }
  .wh-fab .btn.in { color: var(--ds-success); } .wh-fab .btn.out { color: var(--ds-warning); }
  #whOut { padding-bottom: 76px; }
  #whMove { display: none !important; }
  .wh-grid { grid-template-columns: 1fr; }
  .wh-card { padding: var(--ds-space-2) var(--ds-space-3); }
  .wh-thumb { width: 52px; height: 52px; }
  .wh-card .row-actions button { min-height: 40px; min-width: 40px; }
  .wh-bar .us-filters input[type=search] { flex: 1 1 100%; }
}

/* Warehouse (V7.9.4.93): items table */
.wh-itbl td, .wh-itbl th { vertical-align: middle; }
.wh-sort { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.wh-nm b { display: block; }
.wh-nm .wh-m, .wh-nm .wh-nt { display: block; color: var(--ds-text-2); font-size: var(--ds-small); margin-top: 2px; }
.wh-nm .wh-m { display: none; }
.wh-q { white-space: nowrap; min-width: 96px; font-weight: 700; }
.wh-q small { font-weight: 400; color: var(--ds-text-2); }
.wh-q .wh-lvl { margin-top: 4px; }
.wh-c1 { width: 36px; text-align: center; }
.wh-act { white-space: nowrap; text-align: end; }
.wh-act button { min-width: 34px; height: 32px; border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-border); background: transparent; color: var(--ds-text, #fff); cursor: pointer; font-size: 14px; padding: 0 6px; }
.wh-act .edit { border-color: var(--b-sel-bd, var(--ds-border)); } .wh-act .del { border-color: var(--ds-danger, #e5484d); }
.wh-st { font-style: normal; font-size: var(--ds-small); border-radius: var(--ds-radius-sm); padding: 1px 8px; border: 1px solid var(--ds-border); white-space: nowrap; }
.wh-st.ok { color: var(--ds-success); border-color: var(--ds-success); } .wh-st.low { color: var(--ds-warning); border-color: var(--ds-warning); }
.wh-st.out { color: #fff; background: var(--ds-danger, #e5484d); border-color: transparent; } .wh-st.none { color: var(--ds-text-2); }
.wh-irow.out td:first-child, .wh-irow.low td:first-child { box-shadow: inset -3px 0 0 var(--ds-warning); }
.wh-bulk { display: flex; align-items: center; gap: var(--ds-space-2); flex-wrap: wrap; margin: 0 0 var(--ds-space-3); padding: 8px 12px; border-radius: var(--ds-radius-md); border: 1px solid var(--b-sel-bd, var(--ds-border)); background: var(--b-sel-bg, transparent); }
@media (max-width: 700px) {
  .wh-itbl .wh-hm { display: none; }
  .wh-nm .wh-m { display: block; }
  .wh-act button { min-width: 40px; height: 40px; }
  .wh-act { white-space: normal; }
  .wh-act button.edit, .wh-act button.del { display: inline-block; }
}
#whStats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 700px) {
  #whStats { grid-template-columns: repeat(2, 1fr); }
  .wh-itbl th, .wh-itbl td { padding: 8px 4px; }
  .wh-itbl .wh-act { display: grid; grid-template-columns: repeat(2, 38px); gap: 4px; justify-content: end; }
  .wh-itbl .wh-act button { min-width: 0; width: 38px; height: 36px; padding: 0; }
  .wh-itbl .wh-st { font-size: 11px; padding: 1px 5px; }
  .wh-itbl .wh-nm b { font-size: 14px; }
  .wh-itbl .wh-q { min-width: 70px; }
  .wh-itbl .wh-q .wh-lvl { min-width: 56px; }
}
.wh-onlym { display: none; }
@media (max-width: 700px) { .wh-nm .wh-onlym { display: inline-block; margin-top: 3px; } }

/* ===== Table standard (V7.9.4.94): sticky header, two alternating row colours ===== */
body .table th, body.page-v2 .table th { position: sticky; top: 0; z-index: 4; background: #173266; color: #fff; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .28); border-bottom: 0; }
html[data-theme="light"] body .table th, html[data-theme="light"] body.page-v2 .table th { background: #dbe6f7; color: #1b2b4a; box-shadow: inset 0 -2px 0 rgba(60, 80, 120, .45); }
.table tr.z1 { background: rgba(120, 160, 220, .13); }
html[data-theme="light"] .table tr.z1 { background: rgba(60, 100, 170, .09); }
@media (min-width: 900px) { .tbl-fit { overflow: visible !important; } }
@media print { body .table th, body.page-v2 .table th { position: static; } }
.wh-sort { color: inherit; }

/* Warehouse: compact header row and stats */
.wh-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2); margin: 0 0 var(--ds-space-3); }
.wh-top .chk-roles { margin: 0 !important; flex-wrap: nowrap; }
.wh-top .wh-bar { display: contents; }
.wh-top .us-filters { display: contents; }
.wh-top #whQ { flex: 1 1 180px; min-width: 150px; max-width: 260px; height: 36px; }
.wh-top .us-tools { margin-inline-start: auto; }
#whStats .stat { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; min-height: 0; }
#whStats .stat span { min-height: 0; margin: 0; }
#whStats .stat b { font-size: 20px; }
#whStats.stats { gap: 6px; margin-bottom: 8px; }
@media (min-width: 900px) { .st-row > #whStats.stats { grid-template-columns: 1fr !important; } }
.wh-short { padding: 6px 12px; margin-bottom: 8px; }
.wh-bulk { margin-bottom: 8px; padding: 6px 12px; }
.wh-bulk .btn.danger { font-weight: 700; }

/* Emdad dashboard (V7.9.4.96) */
.em-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); align-items: start; }
@media (max-width: 899px) { .em-grid { grid-template-columns: 1fr; } }
.em-h { margin: 0 0 8px; font-size: var(--ds-card-title); }
.em-hd { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2); flex-wrap: wrap; margin-bottom: 8px; }
.em-hd .em-h { margin: 0; }
.em-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }
#emStats .stat { padding: 8px 14px; }
#emStats.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .st-row > #emStats.stats { grid-template-columns: repeat(2, 1fr) !important; } }
/* Warehouse top row: tabs + actions on the first line, search + type filter on the second */
.wh-top .chk-roles { order: 1; }
.wh-top .us-tools { order: 2; margin-inline-start: auto; }
.wh-top .us-filters { display: flex; order: 3; flex: 0 0 100%; gap: var(--ds-space-2); align-items: center; flex-wrap: wrap; }
.wh-top #whQ { max-width: 320px; }
body.page-v2 .wh-top .wh-bar { display: contents; }
body.page-v2 .wh-top .us-tools { width: auto; }
.wh-top .wh-short { display: inline-flex; width: auto; margin: 0 0 0 auto; margin-inline: auto 0; padding: 6px 12px; }
.wh-top #whCatSel { min-width: 150px; }
/* Warehouse table: tighter rows */
.wh-itbl td { padding: 4px 8px; }
.wh-itbl .wh-q small { display: inline; margin-inline-start: 3px; }
.wh-itbl .wh-q .wh-lvl { margin-top: 3px; height: 5px; }
.wh-itbl .wh-act button { height: 28px; min-width: 30px; font-size: 13px; }
.wh-itbl .wh-nm b { font-size: 14px; }
@media (max-width: 700px) { .wh-itbl td { padding: 6px 4px; } }
.wh-sn { width: 40px; text-align: center !important; color: var(--ds-text-2); font-variant-numeric: tabular-nums; }
.wh-act .wh-mv svg, .wh-fab .btn svg { vertical-align: -3px; }
.wh-act .wh-mv.in { color: var(--ds-success); border-color: var(--ds-success); }
.wh-act .wh-mv.out { color: var(--ds-warning); border-color: var(--ds-warning); }
.wh-fab .btn svg { margin-inline-end: 4px; }
.wh-selcell { text-align: end !important; white-space: nowrap; }
.wh-selbtns { display: inline-flex; align-items: center; gap: 4px; }
.wh-selbtns .btn { font-weight: 700; font-size: 12px; padding: 3px 8px; min-height: 0; line-height: 1.5; }
@media (max-width: 700px) { .wh-selbtns { flex-wrap: wrap; white-space: normal; } }

/* Warehouse management (V7.9.4.103) */
.wh-btbl td { padding: 3px 6px; }
.wh-btbl select, .wh-btbl input[data-bf] { width: 100%; min-width: 90px; height: 30px; padding: 0 8px; border-radius: var(--ds-radius-sm); font-size: var(--ds-secondary); }
.wh-btbl input[data-bf="min"] { min-width: 70px; max-width: 110px; }
.wh-btbl tr.wh-dirty td { box-shadow: inset 0 0 0 9999px rgba(245, 166, 35, .10); }
.wh-cleang { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--ds-space-3); }
.wh-cln { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: 12px 16px; }
.wh-cln b { font-size: 24px; }
.wh-imp { display: flex; flex-wrap: wrap; gap: 6px; }
/* Receive / issue dialog */
.wh-mitem { margin: 0 0 var(--ds-space-3); font-size: var(--ds-card-title); }
.wh-seg { display: flex; gap: 8px; margin: 0 0 var(--ds-space-3); }
.wh-seg button { flex: 1; min-height: 44px; border-radius: var(--ds-radius-md); border: 1px solid var(--ds-border); background: transparent; color: var(--ds-text-2); font: inherit; font-weight: 700; cursor: pointer; }
.wh-seg button svg { vertical-align: -3px; margin-inline-end: 4px; }
.wh-seg button[data-k="in"].on { background: rgba(76, 195, 138, .16); border-color: var(--ds-success); color: var(--ds-success); }
.wh-seg button[data-k="out"].on { background: rgba(245, 166, 35, .16); border-color: var(--ds-warning); color: var(--ds-warning); }
#whMFind { margin-bottom: 6px; }

/* Receive / issue voucher screen (V7.9.4.106) */
.wm-head { margin-bottom: var(--ds-space-3); }
.wm-head .wh-seg { max-width: 420px; }
.wm-tbl td { padding: 4px 8px; }
.wm-item { width: 100%; min-width: 220px; height: 34px; padding: 0 10px; border-radius: var(--ds-radius-sm); }
.wm-qty { width: 110px; height: 34px; padding: 0 10px; border-radius: var(--ds-radius-sm); text-align: center; }
.wm-bal, .wm-aft { white-space: nowrap; font-weight: 700; }
.wm-aft.wm-bad { color: var(--ds-danger, #e5484d); }
.wm-foot { display: flex; align-items: center; gap: var(--ds-space-3); margin-top: var(--ds-space-3); }
.wm-sum { margin-inline-start: auto; color: var(--ds-text-2); }
.wh-vid { font-size: var(--ds-small); color: var(--ds-text-2); white-space: nowrap; }
@media (max-width: 700px) { .wm-item { min-width: 150px; } .wm-qty { width: 80px; } }

/* Header offset only when the PAGE is the scroller (no scrolling wrapper): otherwise it sticks inside its own wrapper at 0 */
body .table.tbl-ps th, body.page-v2 .table.tbl-ps th { top: var(--tbl-top, 0px); }
/* Admin tabs wrap on phones; voucher lines become cards */
@media (max-width: 700px) {
  .wh-top .chk-roles { flex-wrap: wrap !important; }
  .wm-tbl, .wm-tbl tbody { display: block; width: 100%; }
  .wm-tbl tr:first-child { display: none; }
  .wm-tbl tr { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--ds-border); align-items: end; }
  .wm-tbl td { display: block; padding: 0; border: 0; text-align: start; }
  .wm-tbl td.wh-sn { display: none; }
  .wm-tbl td:nth-child(2) { grid-column: 1 / -1; }
  .wm-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: var(--ds-small); color: var(--ds-text-2); font-weight: 400; }
  .wm-qty { width: 100%; }
  .wm-item { min-width: 0; }
}

/* Warehouse status chips (V7.9.4.108): the filter and the counters in one row */
.wh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--ds-space-3); }
.wh-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ds-border); background: transparent; color: var(--ds-text-2); font: inherit; cursor: pointer; }
.wh-chip b { font-size: 15px; color: var(--ds-text, #fff); }
.wh-chip.warn b { color: var(--ds-warning); }
.wh-chip.on { background: var(--b-sel-bg, rgba(63, 169, 245, .16)); border-color: var(--b-sel-bd, var(--ds-primary)); color: var(--b-sel-ink, var(--ds-text, #fff)); }

/* Warehouse vouchers (V7.9.4.109) */
.wh-kind.count { color: var(--ds-primary, #3fa9f5); border-color: var(--ds-primary, #3fa9f5); }
.wh-ro { padding: 8px 0; font-weight: 700; }
.wh-vdet { display: grid; gap: 8px; }
.wh-vlines { width: 100%; max-width: 640px; border-collapse: collapse; }
.wh-vlines th, .wh-vlines td { padding: 4px 8px; text-align: start; border-bottom: 1px solid var(--ds-border); font-weight: 400; }
.wh-vlines th { color: var(--ds-text-2); }
.wh-vlines tr.voided td { text-decoration: line-through; opacity: .6; }
.wh-mrow .wh-act .edit, .wh-mrow .wh-act .wh-void, .wh-mrow .wh-act .wh-more { margin-inline-start: 4px; }
.wh-seg button[data-k="count"].on { background: rgba(63, 169, 245, .16); border-color: var(--ds-primary, #3fa9f5); color: var(--ds-primary, #3fa9f5); }
.em-grid.bh3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Project documents (V7.9.4.111) */
.pd-files { min-width: 150px; }
.pd-f { display: block; color: var(--ds-primary, #7cc4ff); text-decoration: none; word-break: break-word; font-size: var(--ds-secondary); padding: 1px 0; }
.pd-f:hover { text-decoration: underline; }
.pd-fr { display: flex; align-items: center; gap: 8px; margin: 4px 0; }

/* Technical office cleanup (V7.9.4.115) */
.drw-more { margin: 0 0 var(--ds-space-3); }
.drw-more summary { cursor: pointer; color: var(--ds-text-2); padding: 4px 0; }
.dw-files { min-width: 130px; }
.dw-files .btn { margin: 1px 2px; }
.ts-strip a.chk-role { text-decoration: none; }

/* Drawings table: professional layout (V7.9.4.117) */
.drw-table { table-layout: auto; width: 100%; }
.drw-table th, .drw-table td { padding: 10px 8px; vertical-align: middle; }
.drw-table th:first-child, .drw-table td:first-child { text-align: center; }
.drw-table td { text-align: start; }
.drw-table td.dw-c, .drw-table td.wh-sn { text-align: center; }
.drw-table th { text-align: start; white-space: nowrap; }
.drw-table th.wh-sn, .drw-table th.wh-c1 { width: 44px; text-align: center; }
.drw-table .dw-t { min-width: 260px; }
.dw-h { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.dw-no { display: inline-block; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--ds-border); background: rgba(120, 160, 220, .12); font-weight: 700; font-size: var(--ds-small); letter-spacing: .02em; }
.dw-t b { display: block; font-size: var(--ds-body, 15px); line-height: 1.4; }
.dw-t small, .dw-rev + small, .dw-c small { display: block; color: var(--ds-text-2); font-size: var(--ds-small); margin-top: 2px; }
.dw-rev { font-size: var(--ds-body, 15px); }
.dw-files { white-space: nowrap; }
.dw-files .dw-b { margin: 2px 3px; padding: 4px 10px; }
.dw-act { white-space: nowrap; text-align: end !important; }
.dw-act > * { vertical-align: middle; }
.btn.small.dw-rev-btn { background: linear-gradient(180deg, #f5b942, #e0902a) !important; color: #1b1200 !important; border-color: rgba(255, 220, 140, .6); font-weight: 700; margin-inline-end: 6px; box-shadow: 0 0 0 2px rgba(245, 185, 66, .18); }
.dw-rev-btn:hover { filter: brightness(1.08); }
.dw-row:hover td { background: rgba(120, 160, 220, .09); }
.dw-row.dead td { opacity: .6; }
@media (max-width: 900px) { .drw-table { table-layout: auto; } }
.drw-table td.dw-t { width: 32%; }

/* «عناية»: خلايا قوائم الروتين */
.cr-cell { width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--ds-border, rgba(255,255,255,.3)); background: rgba(255,255,255,.05); color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; line-height: 1; }
.cr-cell:disabled { cursor: default; opacity: .75; }
.cr-1 { background: rgba(76,195,138,.28); border-color: rgba(76,195,138,.8); color: #4cc38a; }
.cr-0 { background: rgba(229,72,77,.25); border-color: rgba(229,72,77,.8); color: #ff6b70; }
.cr-f { opacity: .35; }
.cr-list { display: grid; gap: 6px; }
.cr-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.cr-item .cr-cell { width: 56px; height: 44px; font-size: 1.3rem; }
.cr-t small { display: block; margin-top: 2px; }
.cr-grid th, .cr-grid td { text-align: center; padding: 4px 3px; }
.cr-grid th small { display: block; font-weight: 400; opacity: .75; }
.cr-grid .cr-name { text-align: start; min-width: 200px; }
.cr-grid .cr-cell { width: 30px; height: 28px; font-size: .9rem; }
.cr-today { background: rgba(63,169,245,.25); }
.cr-ft { font-size: .75rem; opacity: .85; }
@media (max-width: 640px) { .cr-item { grid-template-columns: 26px 1fr auto; padding: 8px; } }
.rv-phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.rv-ph { position: relative; display: grid; gap: 4px; }
.rv-ph img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); }
.rv-ph select { width: 100%; }
.rv-ph .del { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; padding: 0; }

/* الجوال: شريط الإعلانات بند واحد يتبدّل كل 5 ثوانٍ (بلا حركة قص الحروف) */
.alert-ticker.tk-rot .tk-view { direction: rtl; overflow: hidden; }
.alert-ticker.tk-rot .tk-rotbox { display: block; }
.alert-ticker.tk-rot .tk-rotbox > .tk-it { display: none; max-width: 100%; }
.alert-ticker.tk-rot .tk-rotbox > .tk-it.on { display: flex; }
.alert-ticker.tk-rot .tk-it b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* الجوال: أزرار التصفية (الكل / بانتظار / معتمدة ...) صف واحد بتمرير أفقي */
@media (max-width: 700px) {
  .ap-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .ap-tabs::-webkit-scrollbar { display: none; }
  .ap-tabs button { flex: none; white-space: nowrap; padding: 7px 12px; }
}

/* الجوال — الشاشة الرئيسية: صف واحد (الشعار يمينًا والحساب والجرس شمالًا)، اللغة والمظهر داخل قايمة المستخدم، شعارات الموديولات أكبر، والاختصارات في صف */
.um-mob { display: none; }
.um-first { display: none; }
@media (max-width: 899px) {
  body.home .page-head h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
}
@media (max-width: 760px) {
  body.home .dash-strip { gap: 6px; }
  body.home .dash-strip > .dash-lbl { flex: 1 1 100%; padding: 0 4px; background: none; border: 0; color: var(--muted); font-size: .8rem; }
  body.home .dash-arr3d { display: none; }
  body.home .dash-pages { flex: 1 1 100%; order: 3; }
  body.home .dash-page.on { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; flex-wrap: nowrap; }
  body.home .dash-wrap { min-width: 0; display: block; }
  body.home .dash-chip { flex-direction: column; justify-content: center; text-align: center; gap: .1rem; min-width: 0; padding: 6px 4px; border-radius: 14px; font-size: .72rem; line-height: 1.25; height: 100%; box-sizing: border-box; }
  body.home .dash-chip b { font-size: 1.3rem; }
  .menu.home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: none; }
  .menu.home-grid .menu-card { flex-direction: column; justify-content: center; text-align: center; padding: 8px 8px 8px; min-height: 0; gap: 6px; }
  .menu.home-grid .menu-card .arrow { display: none; }
  .menu.home-grid .menu-card .text { flex: none; width: 100%; }
  .menu.home-grid .menu-card .text b { font-size: 15px; }
  .menu.home-grid .menu-card .text > span { display: none; }   /* على الجوال الاسم والشعار يكفيان؛ الوصف يبقى على الشاشات الأكبر */
  .menu.home-grid .menu-card .icon-box { width: 104px; height: 78px; padding: 0; box-sizing: border-box; }   /* مربع الشعار بمقاس واحد لكل الموديولات */
  .menu.home-grid .menu-card .icon-box.full img { width: 100%; height: 100%; max-width: none; object-fit: contain; }   /* الشعار كاملًا بلا قص */
  .menu.home-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; width: auto; justify-self: stretch; }
}

/* الجوال: شريط الإعلانات وشريط الاشتراك بنفس العرض والارتفاع والخط */
@media (max-width: 899px) {
  .alert-ticker, .lic-note { margin: 6px 0 0; padding: 0 10px; min-height: 34px; box-sizing: border-box; border-radius: 10px; font-size: 12.5px; line-height: 1.3; display: flex; align-items: center; }
  .alert-ticker .tk-it, .alert-ticker .tk-it b, .lic-note .lic-t { font-size: 12.5px; line-height: 1.3; }
  .lic-note { margin-bottom: 8px; }
  .lic-note .lic-x { width: 24px; height: 24px; font-size: 12px; }
}


/* الجوال — شريط علوي ثابت في كل الصفحات: ☰ و«رجوع» يمينًا، الشعار في المنتصف، والجرس وأول اسم المستخدم يسارًا. اللغة والمظهر داخل قايمة المستخدم. */
@media (max-width: 899px) {
  body.nb .brand { display: none; }
  body.nb .topbar { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-height: 52px; padding: 0; margin-bottom: 8px; }
  body.nb .topbar > span:empty { display: none; }
  body.nb .topbar::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: var(--logo-w); height: var(--logo-h); background: url("../img/company_logo_h.png") center / contain no-repeat; pointer-events: none; }
  html[data-theme="light"] body.nb .topbar::before { background-image: url("../img/print_company.png"); }
  body.nb .topbar > a { order: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--b-ic, 42px); height: var(--b-ic, 42px); padding: 0; font-size: 0; border-radius: var(--b-r, 12px); border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); }   /* مستطيل ظاهر كزر ☰ */
  body.nb .topbar > a::before { content: "→"; font-size: 22px; line-height: 1; font-weight: 700; }
  body.nb .topbar > .sn-btn { order: 0; }
  body.nb .topbar > #userBar { display: contents; }
  body.page-v2 #userBar .theme-btn { display: none; }                       /* EN والمظهر في قايمة المستخدم (ويشمل نسخة الشريط المؤقتة .ub-ghost أثناء التحميل) */
  body.page-v2 .um-menu .um-mob { display: block; }
  body.nb .um { order: 2; margin-inline-start: auto; min-width: 0; }
  body.nb .topbar > .bell-wrap { order: 3; flex: none; margin-inline-start: 0; }
  body.nb .topbar .bell-btn { transform: scale(.88); transform-origin: center; }
  body.page-v2 .um-name, body.page-v2 .um-caret, body.page-v2 .um-btn .um-av { display: none; }       /* بدل الاسم الكامل والحرف: أول اسم المستخدم، والكامل داخل القايمة */
  body.page-v2 .um-first { display: inline-block; max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
  body.page-v2 .um-btn { padding: 0 9px; height: 34px; }
}
@media (max-width: 340px) { body.page-v2 .um-first { display: none; } body.page-v2 .um-btn .um-av { display: grid; } body.page-v2 .um-btn { padding: 0 4px; } :root { --logo-w: 92px; } }
.alert-ticker.tk-rot .tk-cnt { font-size: 11px; font-weight: 700; opacity: .8; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); direction: ltr; }

/* شعارات قُصّت هوامشها (بنسبة غير 4:3): تُعرض كاملة داخل مربع الصورة بدل التغطية التي كانت ستقصّها */
.menu-card .icon-box.full img[src$="ic_basma_logo.webp"], .menu-card .icon-box.full img[src$="ic_care_logo.webp"], .menu-card .icon-box.full img[src$="ic_jawda_logo.webp"],
.menu-card .icon-box.full img[src$="ic_ohda_logo.webp"], .menu-card .icon-box.full img[src$="ic_sanad_logo.png"] { object-fit: contain; padding: 3px; box-sizing: border-box; }

/* شعار الشركة يفتح الرئيسية: رابط شفاف فوق الشعار (الشعار خلفية CSS) */
.co-logo-link { display: none; }
@media (min-width: 900px) { body.nb .topbar > .co-logo-link { display: block; position: absolute; z-index: 25; inset-inline-start: max(20px, calc((100vw - 1560px) / 2 + 16px)); top: 50%; transform: translateY(-50%); width: 210px; height: 66px; cursor: pointer; } }
@media (max-width: 899px) { body.nb .topbar > .co-logo-link { display: block; position: absolute; z-index: 25; left: 50%; top: 4px; transform: translateX(-50%); width: var(--logo-w); height: var(--logo-h); cursor: pointer; } }
@media print { .co-logo-link { display: none !important; } }

/* الجوال — تناسق الشكل: نصف قطر واحد (14) ومسافة واحدة (10) وأحجام موحّدة للشرايط والاختصارات والبطاقات وأزرار الشريط العلوي */
@media (max-width: 899px) {
  :root { --m-r: 14px; --m-gap: 10px; --m-ctl: 40px; }
  body.nb .topbar { margin-bottom: var(--m-gap); min-height: 52px; }
  body.nb .topbar .sn-btn, body.nb .topbar > a:not(.co-logo-link), body.nb .topbar .bell-btn { width: var(--m-ctl); height: var(--m-ctl); border-radius: var(--m-r); }
  body.nb .topbar .bell-btn { transform: none; }
  body.page-v2 .um-btn { height: var(--m-ctl); border-radius: var(--m-r); }
  .alert-ticker, .lic-note { margin: 0 0 var(--m-gap); border-radius: var(--m-r); min-height: 36px; }
  body.nb .page-head { margin-top: 0; margin-bottom: var(--m-gap); }
  body.home .page-head h1 { text-align: start; }                         /* الترحيب على اليمين كباقي العناوين */
  body.home .dash-strip { margin: 0 0 var(--m-gap); }
  body.home .dash-strip > .dash-lbl { margin-bottom: 0; }
  body.home .dash-page.on { gap: var(--m-gap); }
  body.home .dash-chip { height: 72px; border-radius: var(--m-r); padding: 6px 4px; font-size: .72rem; }
  body.home .dash-chip b { font-size: 1.25rem; line-height: 1.1; }
  body.home .dash-chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .menu.home-grid { gap: var(--m-gap); margin-top: 0; }
  .menu.home-grid .menu-card { height: 120px; border-radius: var(--m-r); padding: 8px; box-sizing: border-box; overflow: hidden; }
  .menu.home-grid .menu-card .text b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .menu.home-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - var(--m-gap) / 2); justify-self: center; }   /* الأخيرة بنفس مقاس الباقي */
}

/* الجوال: شريط الإعلانات والتنبيهات بلا عنوان — النص المتحرك يأخذ العرض كله */
@media (max-width: 899px) { .alert-ticker:not(.tk-rot) .tk-lbl { display: none; } }

/* الرئيسية على الجوال: ☰ بأسماء الأقسام، وحذف جملة الترحيب وعنوان «اختصارات سريعة» */
.sidenav a img.sn-ic { flex: none; width: 34px; height: 26px; object-fit: contain; border-radius: 6px; background: linear-gradient(160deg, #f6fcff, #b4dbf6); }
@media (min-width: 1100px) { body.home #sidenav, body.home .sn-scrim { display: none !important; } }
@media (max-width: 899px) {
  body.home .page-head { display: none; }
  body.home .dash-strip > .dash-lbl { display: none; }
}

/* الجوال — بطاقات الموديولات: 3 أعمدة بمقاس واحد (96px)، مربع الشعار 72×54، والاسم حتى سطرين */
@media (max-width: 760px) {
  .menu.home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .menu.home-grid .menu-card { height: 96px; padding: 6px 4px; gap: 4px; justify-content: flex-start; }   /* مربعات الشعارات على خط واحد حتى لو اسم بسطرين */
  .menu.home-grid .menu-card .icon-box { width: 72px; height: 54px; }
  .menu.home-grid .menu-card .text b { font-size: 11.5px; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; }
  .menu.home-grid > :last-child:nth-child(odd) { grid-column: auto; width: auto; justify-self: stretch; }
}

/* الجوال — بطاقات الموديولات أقصر (الأسماء قصيرة بسطر واحد): 84px */
@media (max-width: 760px) {
  .menu.home-grid .menu-card { height: 84px; }
  .menu.home-grid .menu-card .text b { -webkit-line-clamp: 1; text-overflow: ellipsis; }
}

/* الجوال — بطاقات الموديولات بحجم ثابت (3 في الصف) والناقص من الصف الأخير يتوسّط، مهما كان عدد الأقسام */
@media (max-width: 760px) {
  .menu.home-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .menu.home-grid > .menu-card, .menu.home-grid > :last-child:nth-child(odd) { flex: 0 0 calc((100% - 16px) / 3); width: auto; max-width: calc((100% - 16px) / 3); grid-column: auto; justify-self: auto; }
}

/* V7.9.4.161 warehouse (desktop): tabs, search + type filter and actions share one line instead of two */
@media (min-width: 1000px) {
  .wh-top .chk-roles { order: 1; }
  .wh-top .us-filters { order: 2; flex: 0 1 auto; flex-wrap: nowrap; }
  .wh-top .us-tools { order: 3; margin-inline-start: auto; }
}

/* V7.9.4.162 warehouse (phone): tighter controls, compact item rows, bulk-edit table as cards */
@media (max-width: 700px) {
  .wh-top { gap: 6px; }
  .wh-top .chk-role { padding: 6px 10px; font-size: 14px; }
  .wh-top .us-tools .btn { font-size: 12px; padding: 4px 9px; min-height: 32px; }
  .wh-top .us-filters { gap: 6px; }
  .wh-top #whQ { flex: 1 1 100%; max-width: none; min-width: 0; }
  .wh-top #whCatSel, .wh-top #whBFilter { flex: 1 1 calc(50% - 3px); min-width: 0; max-width: none; }
  .wh-top .us-filters:has(#whBFilter[style*="none"]) #whQ { flex: 1 1 52%; }
  .wh-top .us-filters:has(#whBFilter[style*="none"]) #whCatSel { flex: 1 1 36%; }
  .wh-chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; margin-bottom: 8px; }
  .wh-chip { flex: 0 0 auto; white-space: nowrap; padding: 5px 11px; }
  /* viewer items: one compact card per row (name + small meta | balance | actions) */
  .wh-itbl[data-pg="wh-items"], .wh-itbl[data-pg="wh-items"] tbody { display: block; width: 100%; }
  .wh-itbl[data-pg="wh-items"] tr:first-child { display: none; }
  .wh-itbl[data-pg="wh-items"] tr.wh-irow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 8px; padding: 6px 8px; border-bottom: 1px solid var(--ds-border); }
  .wh-itbl[data-pg="wh-items"] .wh-irow td { display: block; padding: 0; border: 0; }
  .wh-itbl[data-pg="wh-items"] .wh-irow .wh-sn, .wh-itbl[data-pg="wh-items"] .wh-irow .wh-hm { display: none; }
  .wh-itbl[data-pg="wh-items"] .wh-irow .wh-nm b { display: inline; margin-inline-end: 6px; }
  .wh-itbl[data-pg="wh-items"] .wh-irow .wh-q { min-width: 64px; text-align: center; }
  /* bulk-edit table as cards: select-all / bulk buttons stay on the header line */
  .wh-btbl, .wh-btbl tbody { display: block; width: 100%; }
  .wh-btbl tr:first-child { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; }
  .wh-btbl tr:first-child th { display: none; border: 0; padding: 0; }
  .wh-btbl tr:first-child th.wh-c1, .wh-btbl tr:first-child th.wh-selcell { display: block; width: auto; }
  .wh-btbl tr[data-id] { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px 8px; align-items: end; padding: 6px 6px 8px; border-bottom: 1px solid var(--ds-border); }
  .wh-btbl tr[data-id] td { display: block; padding: 0; border: 0; min-width: 0; }
  .wh-btbl .wh-sn { display: none !important; }
  .wh-btbl td.wh-c1 { grid-column: 1 / 2; grid-row: 1; width: auto; align-self: center; }
  .wh-btbl td.wh-nm { grid-column: 2 / 8; grid-row: 1; align-self: center; }
  .wh-btbl td.wh-f-qty { grid-column: 8 / 10; grid-row: 1; align-self: center; text-align: center; }
  .wh-btbl td.wh-act { grid-column: 10 / 13; grid-row: 1; text-align: end; align-self: center; white-space: nowrap; }
  .wh-btbl td.wh-f-cat { grid-column: 1 / 7; grid-row: 2; }
  .wh-btbl td.wh-f-place { grid-column: 7 / 13; grid-row: 2; }
  .wh-btbl td.wh-f-unit { grid-column: 1 / 7; grid-row: 3; }
  .wh-btbl td.wh-f-min { grid-column: 7 / 13; grid-row: 3; }
  .wh-btbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ds-text-2); margin-bottom: 1px; }
  .wh-btbl select, .wh-btbl input[data-bf], .wh-btbl input[data-bf="min"] { min-width: 0; max-width: none; width: 100%; }
}

/* V7.9.4.163 desktop: section logo beside the page title (one line instead of two); stat tiles centre their content when stretched next to a chart */
@media (min-width: 900px) {
  body.nb:not(.home) .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 12px; }
  body.nb:not(.home) .page-head > img, body.page-v2:not(.home) .page-head img { height: 36px; max-width: 100px; margin: 0; padding: 4px 8px; border-radius: 10px; }
  body.nb:not(.home) .page-head > p { flex: 1 0 100%; }
}
.st-row > .stats .stat { display: flex; flex-direction: column; justify-content: center; }

/* V7.9.4.164 phone: section screens list becomes one horizontal strip; the custody ledger becomes cards */
@media (max-width: 899px) {
  .sec-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: var(--m-gap, 10px) 0; }
  .sec-links-t, .sec-links a > i { display: none; }
  .sec-links a { flex: 1 1 auto; justify-content: center; white-space: nowrap; padding: 6px 10px; border: 1px solid var(--ds-border); border-radius: 999px; font-size: 13px; gap: 6px; }
  .sec-links a:last-child { border: 1px solid var(--ds-border); }
  .sec-links a svg { width: 16px; height: 16px; }
  .sec-links a span { flex: none; }
  body.page-v2 .pn-table[data-pg="ohda-ledger"], .pn-table[data-pg="ohda-ledger"], .pn-table[data-pg="ohda-ledger"] tbody { display: block; width: 100%; min-width: 0 !important; }
  .pn-table[data-pg="ohda-ledger"] tr { box-sizing: border-box; width: 100%; }
  .pn-table[data-pg="ohda-ledger"] thead tr { display: flex; padding: 4px 6px; }
  .pn-table[data-pg="ohda-ledger"] thead th { display: none; }
  .pn-table[data-pg="ohda-ledger"] thead th[data-sel] { display: block; }
  .pn-table[data-pg="ohda-ledger"] tbody tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--ds-border); }
  .pn-table[data-pg="ohda-ledger"] tbody td { display: block; padding: 0; border: 0; min-width: 0; width: auto; max-width: none; }
  .pn-table[data-pg="ohda-ledger"] td:empty { display: none; }
  .pn-table[data-pg="ohda-ledger"] td[data-sel] { grid-column: 1; grid-row: 1; width: auto; }
  .pn-table[data-pg="ohda-ledger"] td.o-d { grid-column: 2 / 5; grid-row: 1; }
  .pn-table[data-pg="ohda-ledger"] td.o-a { grid-column: 5 / 6; grid-row: 1; }
  .pn-table[data-pg="ohda-ledger"] td.ra-act { grid-column: 6 / 7; grid-row: 1; text-align: end; white-space: normal; }
  .pn-table[data-pg="ohda-ledger"] td.o-g { grid-column: 1 / 7; grid-row: 2; font-weight: 700; }
  .pn-table[data-pg="ohda-ledger"] td.o-s { grid-column: 1 / 7; grid-row: 3; max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .pn-table[data-pg="ohda-ledger"] td.o-i { grid-column: 1 / 3; grid-row: 4; }
  .pn-table[data-pg="ohda-ledger"] td.o-v { grid-column: 3 / 5; grid-row: 4; }
  .pn-table[data-pg="ohda-ledger"] td.o-b { grid-column: 5 / 7; grid-row: 4; }
  .pn-table[data-pg="ohda-ledger"] td[data-l]::before, .pn-table[data-pg="ohda-ledger"] tfoot th[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 400; color: var(--ds-text-2); }
  .pn-table[data-pg="ohda-ledger"] tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 6px; }
  .pn-table[data-pg="ohda-ledger"] tfoot th { display: block; padding: 0; border: 0; }
  .pn-table[data-pg="ohda-ledger"] tfoot th:empty, .pn-table[data-pg="ohda-ledger"] tfoot th.no-print { display: none; }
}

/* V7.9.4.166 phone: filter rows pair up (two fields per line) instead of one field per line */
@media (max-width: 599px) {
  .controls { gap: 8px; }
  .controls > label:not(.grow) { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .controls > label.grow, .controls > label:has(input[type="search"]), .controls > label:has(#qf) { flex: 1 1 100%; min-width: 0; }
  .controls select, .controls input:not([type="checkbox"]):not([type="radio"]) { width: 100%; min-width: 0; max-width: none; }
  .fit-ctl select, .fit-ctl input[type="search"] { min-width: 0; max-width: none; width: 100%; }
  .ms-side .ms-dates { flex-wrap: nowrap; gap: 8px; }
  .ms-side .ms-dates label { flex: 1 1 0; min-width: 0; }
  .ms-side .ms-dates input { width: 100%; min-width: 0; }
}

/* V7.9.4.167 phone: a long obstacle description shows 3 lines until tapped */
@media (max-width: 599px) {
  .ms-card .obs-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; cursor: pointer; }
  .ms-card .obs-desc.open { display: block; -webkit-line-clamp: unset; }
}

/* V7.9.4.168 care: check box beside the item text; donut smaller beside its legend on phones; sites table as cards on phones */
.cr-item { grid-template-columns: 32px auto 1fr; }
.cr-item .cr-cell { order: 2; width: 48px; height: 38px; font-size: 1.2rem; }
.cr-item .cr-t { order: 3; }
@media (max-width: 640px) { .cr-item { grid-template-columns: 26px auto 1fr; } }
@media (max-width: 599px) {
  .st-row > .panel > .chart > div[style*="flex-wrap"] { flex-wrap: nowrap !important; gap: 10px !important; }
  .st-row > .panel svg[viewBox="0 0 180 180"] { width: 104px !important; height: 104px !important; }
  .cs-sites, .cs-sites tbody { display: block; width: 100%; min-width: 0 !important; }
  .cs-sites thead { display: none; }
  .cs-sites tbody tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 6px; align-items: end; padding: 8px 6px; border-bottom: 1px solid var(--ds-border); }
  .cs-sites tbody td { display: block; padding: 0; border: 0; min-width: 0; text-align: center; }
  .cs-sites td.wh-sn { display: none; }
  .cs-sites td.cs-n { grid-column: 1 / 4; text-align: start; }
  .cs-sites td.cs-l { grid-column: 4 / 6; text-align: end; color: var(--ds-text-2); font-size: 12px; }
  .cs-sites td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ds-text-2); }
  .cs-sites td.ra-act { grid-column: 1 / 6; text-align: end; }
}

/* V7.9.4.169 care: quarterly photo report (work title, what was done, photos beneath) */
.rp-body .rp-work { padding: 0 0 var(--ds-space-4); margin: 0 0 var(--ds-space-4); border-bottom: 1px solid var(--ds-border); }
.rp-body .rp-work:last-child { border-bottom: 0; margin-bottom: 0; }
.rp-body .rp-work h3 { margin: 0 0 2px; font-size: var(--ds-card-title); display: flex; align-items: center; gap: 8px; }
.rp-body .rp-work h3 span { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--b-sel-bg, rgba(63, 169, 245, .18)); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.rp-body .rp-d { color: var(--ds-text-2); font-size: var(--ds-secondary); margin-bottom: 6px; }
.rp-body .rp-work p { margin: 0 0 8px; line-height: 1.8; }
.rp-body .rp-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rp-body .rp-ph figure { margin: 0; }
.rp-body .rp-ph img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--ds-border); display: block; }
.rp-body .rp-ph figcaption { text-align: center; font-size: var(--ds-small); color: var(--ds-text-2); margin-top: 2px; }
@media (max-width: 599px) { .rp-body .rp-ph { grid-template-columns: 1fr 1fr; } .rp-body .rp-ph img { height: 130px; } }
@media (max-width: 599px) {
  .cs-works, .cs-works tbody { display: block; width: 100%; min-width: 0 !important; }
  .cs-works thead { display: none; }
  .cs-works tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--ds-border); }
  .cs-works tbody td { display: block; padding: 0; border: 0; min-width: 0; }
  .cs-works td.wh-sn, .cs-works td.cw-p { display: none; }
  .cs-works td.cw-t { grid-column: 1; grid-row: 2; }
  .cs-works td.cw-d { grid-column: 1; grid-row: 1; color: var(--ds-text-2); font-size: 12px; }
  .cs-works td.cw-s { display: none; }
  .cs-works td.ra-act { grid-column: 2; grid-row: 1 / 3; white-space: nowrap; }
}
.rp-body .rp-site { margin: var(--ds-space-4) 0 var(--ds-space-2); font-size: var(--ds-section-title); }
.rp-body .rp-site:first-child { margin-top: 0; }
.rp-body .rp-site small { color: var(--ds-text-2); font-weight: 400; }

/* V7.9.4.173 care report: cleaning section (per-item results) beside the maintenance works */
.rp-body .rp-h { margin: var(--ds-space-4) 0 var(--ds-space-2); padding: 6px 10px; border-radius: var(--ds-radius-md); background: var(--b-sel-bg, rgba(63, 169, 245, .16)); font-size: var(--ds-section-title); }
.rp-body .rp-h:first-child { margin-top: 0; }
.rp-body .rp-k { margin: var(--ds-space-3) 0 4px; font-size: var(--ds-card-title); }
.rp-body .rp-k small { color: var(--ds-text-2); font-weight: 400; }
.rp-body .rp-tbl td, .rp-body .rp-tbl th { padding: 4px 8px; }
.rp-chk { flex-direction: row !important; align-items: center; gap: 6px !important; white-space: nowrap; }
.rp-chk input { width: 18px; height: 18px; margin: 0; }
@media (max-width: 599px) { body.page-v2 .panel:has(.table):has(th:nth-child(4)) .rp-tbl { min-width: 0; } .rp-body .rp-tbl td, .rp-body .rp-tbl th { padding: 4px 4px; font-size: 12px; } }

/* V7.9.4.177 security: the activity log as a table (user, action, detail, time) */
.sc-log { width: 100%; table-layout: auto; }
.sc-log th, .sc-log td { padding: 6px 8px; vertical-align: top; text-align: start; }
.sc-log .sc-u { white-space: nowrap; }
.sc-log .sc-a { white-space: nowrap; color: var(--ds-text); }
.sc-log .sc-d { color: var(--ds-text-2); }
.sc-log .sc-t { white-space: nowrap; color: var(--ds-text-2); font-size: var(--ds-secondary); text-align: end; }
@media (max-width: 599px) {
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .sc-log { min-width: 0; }
  .sc-log th, .sc-log td { padding: 5px 4px; font-size: 12.5px; }
  .sc-log .sc-a { white-space: normal; }
}

/* V7.9.4.182 RoOt: alert links, tab bar */
.ad-alert a { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ad-alert a:hover { text-decoration: underline; }
@media (max-width: 599px) { .ad-strip.ad-alert { flex-direction: column; align-items: flex-start; gap: 6px; } }
.sc-log td .rr-info { display: block; margin-top: 2px; }
.ad-strip.ad-alert { gap: 4px 18px; flex-wrap: wrap; }

/* V7.9.4.187 RoOt «الأقسام» on phones: one card per section (image + name + switch, then the other names, then order and reset) */
@media (max-width: 599px) {
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .hl-tbl { min-width: 0; }
  .hl-tbl, .hl-tbl tbody { display: block; width: 100%; min-width: 0; }
  .hl-tbl tr:first-child { display: none; }
  .hl-tbl tr[data-k] { display: grid; grid-template-columns: 64px minmax(0, 1fr) 56px; gap: 6px 10px; align-items: end; padding: 10px 6px; border-bottom: 1px solid var(--ds-border); }
  .hl-tbl tr[data-k] td { display: block; padding: 0; border: 0; min-width: 0; width: auto; }
  .hl-tbl td.hl-pc { grid-column: 1; grid-row: 1; align-self: center; }
  .hl-tbl td.hl-f-t { grid-column: 2; grid-row: 1; }
  .hl-tbl td.hl-onc { grid-column: 3; grid-row: 1; align-self: center; }
  .hl-tbl td.hl-f-te { grid-column: 1 / 4; grid-row: 2; }
  .hl-tbl td.hl-f-s { grid-column: 1 / 4; grid-row: 3; }
  .hl-tbl td.hl-f-se { grid-column: 1 / 4; grid-row: 4; }
  .hl-tbl td.hl-ord { grid-column: 1 / 3; grid-row: 5; }
  .hl-tbl td.hl-rc { grid-column: 3; grid-row: 5; text-align: end; }
  .hl-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--ds-text-2); margin-bottom: 1px; }
  .hl-tbl td.hl-f input { width: 100% !important; max-width: none !important; min-width: 0 !important; box-sizing: border-box; }
}

/* V7.9.4.189 «التقارير اليومية»: one main action per row (the rest in a ⋯ menu), the list as cards on phones */
.tq-tbl .ra-act { white-space: nowrap; }
.tq-tbl .ra-act .btn { margin: 0; width: auto; }
.rr-menu { display: inline-block; vertical-align: middle; margin-inline-start: 6px; }
.rr-menu > summary { list-style: none; cursor: pointer; width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ds-border); border-radius: 10px; font-size: 20px; line-height: 1; color: var(--ds-text); background: transparent; }
.rr-menu > summary::-webkit-details-marker { display: none; }
.rr-menu[open] > summary { background: var(--b-sel-bg, rgba(63, 169, 245, .16)); }
.rr-pop { position: fixed; z-index: 60; min-width: 150px; padding: 4px; border-radius: 12px; border: 1px solid var(--ds-border); background: #0f2547; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
html[data-theme="light"] .rr-pop { background: #fff; }
.rr-pop > a, .rr-pop > button { display: flex; align-items: center; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ds-text); font: inherit; font-size: 14px; text-align: start; text-decoration: none; cursor: pointer; }
.rr-pop > a:hover, .rr-pop > button:hover { background: var(--ds-surface-row-hover, rgba(255, 255, 255, .08)); }
.rr-pop > .danger { color: var(--ds-danger, #ff6b6b); }
.tq-tbl .tq-w { display: none; }
.tq-tbl .rr-lock { display: block; margin-top: 2px; color: var(--ds-text-2); }
@media (max-width: 599px) {
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .tq-tbl { min-width: 0; }
  .tq-tbl, .tq-tbl tbody { display: block; width: 100%; min-width: 0; }
  .tq-tbl thead { display: none; }
  .tq-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--ds-border); }
  .tq-tbl tbody td { display: block; padding: 0; border: 0; min-width: 0; width: auto; text-align: start; background: transparent !important; box-shadow: none; }
  .tq-tbl td.tq-d { grid-column: 1; grid-row: 1; color: var(--ds-text-2); font-size: 13px; }
  .tq-tbl td.tq-s { grid-column: 2; grid-row: 1; justify-self: end; }
  .tq-tbl td.tq-p { grid-column: 1 / 3; grid-row: 2; font-weight: 700; }
  .tq-tbl td.tq-l { grid-column: 1; grid-row: 3; color: var(--ds-text-2); font-size: 13px; }
  .tq-tbl td.tq-l::before { content: attr(data-l) ": "; }
  .tq-tbl td.tq-wc { display: none; }
  .tq-tbl .tq-w { display: block; font-weight: 400; }
  .tq-tbl td.ra-act { grid-column: 2; grid-row: 3; justify-self: end; }
}

/* V7.9.4.193 مسار: compact obstacle card (one main action + ⋯ menu), column tabs on phones, supply/inspection requests as cards on phones */
.ms-card .obs-actions { align-items: center; flex-wrap: nowrap; }
.ms-card .obs-actions .btn { margin: 0; width: auto; }
.ms-cols { display: none; }
@media (max-width: 899px) {
  .ms-cols { display: flex; margin: 0 0 10px; }
  .kb { grid-template-columns: minmax(0, 1fr); }
  .kb-col:not(.on) { display: none; }
  .kb-col > header { display: none; }
  .kb-body { max-height: none; }
}
@media (max-width: 599px) {
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .rq-tbl { min-width: 0; }
  .rq-tbl, .rq-tbl tbody { display: block; width: 100%; min-width: 0; }
  .rq-tbl thead { display: none; }
  .rq-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--ds-border, rgba(255,255,255,.12)); }
  .rq-tbl tbody td { display: block; padding: 0; border: 0; min-width: 0; width: auto; text-align: start !important; background: transparent !important; box-shadow: none; }
  .rq-tbl td.q-no { grid-column: 1; grid-row: 1; }
  .rq-tbl td.q-st { grid-column: 2; grid-row: 1; justify-self: end; }
  .rq-tbl td.q-p { grid-column: 1 / 3; grid-row: 2; font-weight: 700; }
  .rq-tbl td.q-d { grid-column: 1 / 3; grid-row: 3; color: var(--ds-text-2); font-size: 13px; }
  .rq-tbl td.q-m { grid-column: 1 / 3; color: var(--ds-text-2); font-size: 12px; }
  .rq-tbl td.q-m::before { content: attr(data-l) ": "; }
}
.ms-filbtn { display: none; margin: 0 0 10px; }
@media (max-width: 599px) {
  .ms-filbtn { display: inline-flex; }
  .ms-fil { display: none; }
  body.ms-fil-open .ms-fil { display: block; }
}

/* V7.9.4.194 رصد: project card is a block with its own links (name, badges); a project-page strip links to the other modules */
div.pcard { cursor: pointer; }
.pcard .pc-name { color: inherit; text-decoration: none; }
.pcard .chip[href] { text-decoration: none; }
.pcard .chip[href]:hover { filter: brightness(1.2); }
#plinks { margin: 0 0 12px; }

/* V7.9.4.195 الموارد البشرية: employee files, company documents, government platforms directory */
.rq-tbl .q-act { white-space: nowrap; text-align: end; }
.rq-tbl .q-act .btn { margin: 0 0 0 6px; width: auto; }
@media (max-width: 599px) { .rq-tbl td.q-act { grid-column: 1 / 3; text-align: start; padding-top: 4px; } }
.gv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.gv-card { display: flex; align-items: stretch; gap: 6px; border: 1px solid var(--ds-border, rgba(255,255,255,.16)); border-radius: 12px; background: rgba(255,255,255,.04); }
.gv-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: inherit; text-decoration: none; border-radius: 12px; }
.gv-open:hover { background: rgba(120, 170, 255, .12); }
.gv-open small { color: var(--ds-text-2, #9fb1cf); font-size: 12px; }
.gv-open em { font-style: normal; color: var(--ds-text-2, #9fb1cf); font-size: 12px; text-align: end; overflow: hidden; text-overflow: ellipsis; }
.gv-act { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 6px 6px 6px 0; }
.gv-act .btn { margin: 0; width: auto; min-width: 34px; padding: 4px 8px; }
body .st-row > .stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* V7.9.4.196 بصمة: drawings and project documents as cards on phones, ⋯ menu beside the main action, tabs on the board */
.dw-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.dw-actions .btn { margin: 0; width: auto; }
@media (max-width: 599px) {
  body.page-v2 .panel:has(.table):has(th:nth-child(4)) .stk-tbl, body.page-v2 .panel:has(.table):has(th:nth-child(4)) .drw-table { min-width: 0 !important; }
  .stk-tbl, .stk-tbl tbody { display: block; width: 100%; min-width: 0; }
  .stk-tbl thead, .stk-tbl tr:has(> th) { display: none; }
  .stk-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 10px 6px; border-bottom: 1px solid var(--ds-border, rgba(255,255,255,.12)); }
  .stk-tbl td { display: flex; justify-content: space-between; gap: 10px; padding: 0; border: 0; min-width: 0; width: auto; text-align: start !important; background: transparent !important; box-shadow: none; }
  .stk-tbl td[data-l]::before { content: attr(data-l); flex: none; color: var(--ds-text-2, #9fb1cf); font-size: 12px; }
  .stk-tbl td:empty, .stk-tbl td.wh-sn { display: none; }
  .stk-tbl td:first-child:not([data-l]), .stk-tbl td.pd-t { font-size: 15px; }
  /* drawings */
  .drw-table, .drw-table tbody { display: block; width: 100%; min-width: 0; }
  .drw-table thead { display: none; }
  .drw-table tbody tr.dw-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 10px 6px; border-bottom: 1px solid var(--ds-border, rgba(255,255,255,.12)); }
  .drw-table tbody td { display: block; padding: 0; border: 0; min-width: 0; width: auto; text-align: start !important; background: transparent !important; box-shadow: none; }
  .drw-table td.wh-sn { display: none; }
  .drw-table td.wh-c1 { grid-column: 2; grid-row: 1; }
  .drw-table td.dw-t { grid-column: 1; grid-row: 1; }
  .drw-table td.dw-st { grid-column: 2; grid-row: 2; justify-self: end; }
  .drw-table td.dw-p { grid-column: 1; grid-row: 2; font-weight: 600; }
  .drw-table td.dw-d { grid-column: 1; grid-row: 3; color: var(--ds-text-2, #9fb1cf); font-size: 13px; }
  .drw-table td.dw-rv { grid-column: 2; grid-row: 3; justify-self: end; }
  .drw-table td.dw-rc { grid-column: 1 / 3; }
  .drw-table td.dw-files { grid-column: 1 / 3; }
  .drw-table td.dw-act { grid-column: 1 / 3; }
  .drw-table td.dw-act .dw-actions { justify-content: flex-start; }
  .dw-rev { display: inline-flex; gap: 6px; align-items: center; }
}
.bh-tabs { margin: 0 0 10px; }
.bh-off { visibility: hidden; height: 0; overflow: hidden; margin: 0; padding: 0; pointer-events: none; }
@media (max-width: 599px) { .drw-table td:has(> .muted:only-child) { display: none; } }

/* V7.9.4.197 نظم: forms tabs and folded screens, users as cards on phones, dashboard chart, activity log */
.fm-mod { margin-bottom: 10px; }
.fm-mod > summary { cursor: pointer; padding: 4px 2px; list-style: none; display: flex; align-items: center; gap: 10px; }
.fm-mod > summary::-webkit-details-marker { display: none; }
.fm-mod > summary::before { content: "▸"; color: var(--ds-text-2, #9fb1cf); }
.fm-mod[open] > summary::before { content: "▾"; }
.fm-a .row-actions { display: inline-flex; align-items: center; gap: 6px; }
.fm-a .btn { margin: 0; width: auto; }
@media (max-width: 599px) {
  .us-filters { flex-wrap: nowrap !important; overflow-x: auto; padding-bottom: 4px; }
  .us-filters .chk-role { flex: none; }
  body.page-v2 .us-twrap { overflow-x: visible; border: 0; background: transparent; }
  body.page-v2 .us-t { min-width: 0; }
  .us-t, .us-t tbody { display: block; width: 100%; }
  .us-t thead { display: none; }
  .us-t tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--ds-border, rgba(255,255,255,.12)); }
  body.page-v2 .us-t td { display: block; padding: 0; border: 0; min-width: 0; background: transparent !important; text-align: start !important; white-space: normal; }
  .us-t td.us-tc { grid-column: 1; grid-row: 1; }
  .us-t td.us-tn { grid-column: 2; grid-row: 1; font-size: 15px; }
  .us-t td.us-ts { grid-column: 3; grid-row: 1; }
  .us-t td.us-tr { grid-column: 1 / 4; grid-row: 2; }
  .us-t td.us-tp { grid-column: 1 / 4; grid-row: 3; }
  .us-t td.us-tu, .us-t td.us-te { grid-column: 1 / 4; text-align: start !important; }
  .us-t td.us-tu:empty { display: none; }
  .us-t td.us-ta { grid-column: 1 / 4; }
}
body .st-row > .nz-kpis { flex: 1 1 380px; margin: 0; }
.nz-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.nz-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; text-decoration: none; color: inherit; border-radius: 12px; }
.nz-link:hover { background: rgba(120, 170, 255, .14); }
.nz-link i { font-style: normal; color: var(--ds-text-2, #9fb1cf); font-size: 12px; }
@media (max-width: 599px) { .nz-card .us-main { min-width: 0; flex: 1 1 60%; } .nz-card .us-main b { white-space: normal; overflow: visible; text-overflow: clip; } }
.ac-t { white-space: nowrap; font-size: 13px; }

/* V7.9.4.198 phones: a horizontal strip of the section's screens under the page title (every section, same links as the side menu) */
.mod-strip { display: none; }
@media (max-width: 899px) {
  .mod-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding: 2px 2px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .mod-strip::-webkit-scrollbar { display: none; }
  .mod-strip a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; min-height: 36px; box-sizing: border-box; border-radius: 999px; border: 1px solid var(--ds-border, rgba(255,255,255,.16)); background: rgba(255,255,255,.05); color: #d6e1f2; text-decoration: none; font-size: 13px; white-space: nowrap; scroll-snap-align: start; -webkit-tap-highlight-color: transparent; }
  .mod-strip a svg { width: 16px; height: 16px; opacity: .8; flex: none; }
  .mod-strip a.on { background: rgba(60,140,230,.28); border-color: #4aa3ff; color: #fff; font-weight: 700; }
  .mod-strip a.on svg { opacity: 1; color: #7cc4ff; }
  html[data-theme="light"] .mod-strip a { color: #1d3358; background: #fff; border-color: #b9c7dc; }
  html[data-theme="light"] .mod-strip a.on { background: #dbeafe; border-color: #3b82f6; color: #0b1b3a; }
}
@media print { .mod-strip { display: none !important; } }

/* V7.9.4.199 report photos: in-browser editor (crop, rotate, arrows, text, blur) */
.ph-ed { position: absolute; bottom: 4px; inset-inline-start: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(20, 90, 200, .85); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
body.pe-open { overflow: hidden; }
.pe-wrap { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #07142b; color: #e8f0fb; }
.pe-top { padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.pe-tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pe-tools::-webkit-scrollbar { display: none; }
.pe-b { flex: none; min-height: 38px; padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pe-b.on { background: rgba(60,140,230,.35); border-color: #4aa3ff; font-weight: 700; }
.pe-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; }
.pe-row[hidden] { display: none; }
.pe-row label { display: inline-flex; align-items: center; gap: 6px; }
.pe-row input[type="range"] { width: 110px; }
.pe-row input[type="text"] { flex: 1; min-width: 200px; min-height: 38px; font-size: 16px; }
.pe-colors { display: inline-flex; gap: 8px; }
.pe-c { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.pe-c.on { outline: 3px solid #4aa3ff; outline-offset: 2px; }
.pe-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden; }
.pe-cv { max-width: 100%; max-height: 100%; touch-action: none; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.5); cursor: crosshair; }
.pe-bottom { display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.12); }
.pe-bottom > span { flex: 1; }
.pe-bottom .btn { margin: 0; width: auto; min-height: 40px; }

/* V7.9.4.200 RoOt «الدخول»: place, IP and trail in their own columns, one line per person */
.sc-login td { vertical-align: middle; }
.sc-login .sc-d { white-space: nowrap; }
.sc-login .sc-pl { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.sc-login .sc-ip { white-space: nowrap; font-size: var(--ds-secondary, 13px); color: var(--ds-text-2); font-variant-numeric: tabular-nums; }
.sc-login .sc-hs { white-space: nowrap; text-align: end; }
@media (max-width: 599px) { .sc-login .sc-d, .sc-login .sc-pl { white-space: normal; max-width: none; } }
/* V7.9.4.200 إدارة التقارير on phones: one card per report, the pick box in the card corner */
@media (max-width: 599px) {
  .ra-table.stk-tbl tr { position: relative; padding-inline-end: 40px; }
  .ra-table.stk-tbl td.ra-ck { position: absolute; inset-inline-end: 8px; top: 12px; width: auto; }
}
/* V7.9.4.200 Nozom settings: a small ✕ for a checklist period; tab rows of the lists / checklists screens scroll sideways on phones */
.ck-x { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--b-tray-bd); background: transparent; color: var(--ds-text-3, #9fb1cf); font: inherit; cursor: pointer; }
.ck-x:hover, .ck-x:focus-visible { color: var(--ds-danger, #ff6b6b); border-color: currentColor; }
.us-bar .hint .btn.small { margin-inline-start: 6px; vertical-align: middle; text-decoration: none; }
@media (max-width: 599px) {
  body.page-v2 .nz-bar .chk-roles { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  body.page-v2 .nz-bar .chk-roles .chk-role { flex: none; }
}
/* V7.9.4.201 Nozom dashboard: the KPI cards sit as 2 × 2 beside the users chart (no lone card in a second row) */
@media (min-width: 900px) {
  body .st-row > .nz-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body .st-row > .nz-kpis:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* V7.9.4.201 the chart box beside stat cards gets the panel corners (it looked cut off), and the alert strip lines up with the page content */
body .st-row > .panel.ac-box, body .ms-row > .ac-box { border-radius: 18px; overflow: hidden; }
body.page-v2 main > .alert-ticker { margin-inline: 0; margin-bottom: 12px; }
/* V7.9.4.201 users table: the code never breaks onto two lines, the project cell stays on one line */
body.page-v2 .us-t .us-tc { white-space: nowrap; width: 1%; }
body.page-v2 .us-t .us-code { white-space: nowrap; display: inline-block; }
@media (min-width: 600px) { body.page-v2 .us-t .us-projs { flex-wrap: nowrap; } body.page-v2 .us-t .us-projs .chip { white-space: nowrap; } }
body.page-v2 .us-t .us-more { cursor: help; }
/* V7.9.4.202 where an item percent comes from: by quantity or the supervisor's estimate */
.pct-src { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; margin-inline-start: 6px; border-radius: 6px; vertical-align: middle; white-space: nowrap; }
.pct-src.qty { color: var(--b-ok, #3fd37a); background: rgba(63, 211, 122, .12); }
.pct-src.est { color: var(--ds-warning, #f0c53d); background: rgba(240, 197, 61, .12); }
.pg-cmp td { vertical-align: middle; }
.pg-cmp .mini { min-width: 140px; }
/* V7.9.4.202 «مطلوب هذا الأسبوع» above the work cards of a new report, and the late items of «جدول مشروعي» */
.due-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; border: 1px dashed rgba(63, 169, 245, .45); background: rgba(63, 169, 245, .08); font-size: 13px; }
.due-strip > b { margin-inline-end: 4px; }
.prow.sp-late { border-inline-start: 3px solid var(--ds-danger, #ff6b6b); }
.prow .sp-meta, .prow .sp-meta b, .prow .sp-meta bdi { display: inline; }
/* V7.9.4.203 «مساعد بُنيان»: the 🤖 button beside the bell and its panel (today's summary + questions) */
.ai-wrap { position: relative; flex: none; margin-inline-start: 8px; }
.ai-btn { position: relative; width: var(--b-ic); height: var(--b-ic); border-radius: var(--b-r); cursor: pointer; font-size: 18px; line-height: 1; border: 1px solid var(--b-neutral-bd); background: var(--b-neutral-bg); color: var(--b-neutral-ink); }
.ai-btn:hover, .ai-btn[aria-expanded="true"] { background: var(--b-hover-bg); }
.ai-panel { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 61; width: min(420px, 94vw); max-height: 74vh; display: flex; flex-direction: column;
  border-radius: 14px; background: #0a1e3e; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 18px 44px rgba(0,0,0,.55); color: #fff; overflow: hidden; }
.ai-panel[hidden], .ai-pane[hidden] { display: none !important; }
.ai-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.ai-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; opacity: .75; }
.ai-tabs { display: flex; gap: 6px; padding: 8px 12px 0; }
.ai-tabs button { flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--b-tray-bd, rgba(255,255,255,.2)); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ai-tabs button.on { background: var(--b-sel-bg, rgba(63,169,245,.25)); border-color: var(--b-sel-bd, #3fa9f5); }
.ai-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ai-body { flex: 1; min-height: 120px; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-m { padding: 8px 11px; border-radius: 12px; font-size: 14px; line-height: 1.6; max-width: 92%; }
.ai-m.me { align-self: flex-start; background: rgba(63,169,245,.22); }
.ai-m.bot { align-self: flex-end; background: rgba(255,255,255,.07); }
.ai-m.wait { opacity: .7; } .ai-m.err { color: #ffb4a8; }
.ai-left { display: block; margin-top: 4px; font-size: 11px; opacity: .65; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-s { padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.ai-s:hover { border-color: #3fa9f5; }
.ai-f { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.12); align-items: flex-end; }
.ai-f textarea { flex: 1; resize: none; min-height: 40px; font: inherit; font-size: 14px; }
.ai-f .btn { width: auto; margin: 0; }
.ai-note { display: block; padding: 0 12px 8px; font-size: 11px; opacity: .6; }
.ai-foot { display: flex; justify-content: flex-start; padding: 6px 12px 10px; border-top: 1px solid rgba(255,255,255,.12); }
.ai-foot .btn { width: auto; margin: 0; }
.ai-brief { display: flex; flex-direction: column; gap: 12px; }
.ai-bs h4 { margin: 0 0 6px; font-size: 13px; color: var(--ds-text-2, #9fb1cf); }
.ai-bi { display: block; padding: 7px 10px; margin-bottom: 4px; border-radius: 10px; background: rgba(255,255,255,.05); border-inline-start: 3px solid #3fa9f5; color: inherit; text-decoration: none; }
.ai-bi:hover { background: rgba(255,255,255,.1); }
.ai-bi.red { border-inline-start-color: #ff6b6b; } .ai-bi.orange { border-inline-start-color: #ffb74d; } .ai-bi.yellow { border-inline-start-color: #f0c53d; }
.ai-bi b { display: block; font-size: 14px; } .ai-bi span { display: block; font-size: 12px; opacity: .75; }
.ai-none { margin: 0; font-size: 13px; opacity: .65; }
@media (max-width: 899px) { .ai-panel { position: fixed; top: 64px; inset-inline: 8px; width: auto; max-width: 460px; margin-inline: auto; max-height: calc(100vh - 90px); } }
html[data-theme="light"] .ai-panel { background: #ffffff; color: #0b1b3a; border-color: #b9c6d8; }
html[data-theme="light"] .ai-m.bot, html[data-theme="light"] .ai-bi { background: #f2f6fb; }
html[data-theme="light"] .ai-btn { background: #f2f6fb; border: 1.5px solid #6c82a3; color: #0b1b3a; }
/* V7.9.4.204 user window: the group ticks in a tidy grid, one line each, no box drawn around the checkbox */
body.page-v2 .us-rchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
body.page-v2 .us-rc { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--ds-border, rgba(255,255,255,.12)); min-width: 0; }
body.page-v2 .us-rc:has(input:checked) { border-color: var(--b-sel-bd, #3fa9f5); background: rgba(63, 169, 245, .12); }
body.page-v2 .us-rc input[type="checkbox"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.page-v2 .us-rc span { min-width: 0; line-height: 1.35; }
/* V7.9.4.205 phones: the 🤖 button sits with the bell on the left (it had pushed «رجوع» over the logo); with it the user button shows the initial instead of the first name.
   The page colour reaches the bottom of the screen on short pages (a phone ignores a fixed background, so the body's own gradient ended above the screen bottom) */
@media (max-width: 899px) {
  body.nb .topbar > .ai-wrap { order: 3; flex: none; margin-inline-start: 0; }
  body.nb .topbar .ai-btn { transform: scale(.88); transform-origin: center; }
  body.page-v2 .topbar:has(> .ai-wrap) .um-first { display: none; }
  body.page-v2 .topbar:has(> .ai-wrap) .um-btn .um-av { display: grid; }
  body.page-v2 .topbar:has(> .ai-wrap) .um-btn { padding: 0 4px; }
  html { background: #0b2347; }
  body { min-height: 100vh; min-height: 100dvh; }
}
@media (max-width: 419px) { body.nb:has(.topbar > .ai-wrap) .topbar { --logo-w: 88px; gap: 4px; } body.nb .topbar:has(> .ai-wrap) .ai-btn, body.nb .topbar:has(> .ai-wrap) .bell-btn { width: 34px; height: 34px; transform: none; font-size: 16px; } }
/* V7.9.4.206 permissions: who opens a screen (👤 n), search a person, where each open screen comes from */
.pm-who { margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--ds-border, rgba(255,255,255,.18)); background: transparent; color: var(--ds-text-2, #9fb1cf); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.pm-who:hover { border-color: #3fa9f5; color: #fff; }
#pmWho { min-width: 200px; }
.pm-wholist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.pm-whoit { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--ds-border, rgba(255,255,255,.14)); background: rgba(255,255,255,.04); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pm-whoit:hover { border-color: #3fa9f5; }
.pm-whoit small { color: var(--ds-text-2, #9fb1cf); }
.pv-from { color: var(--ds-text-3, #8aa0c0); font-size: 11px; }
/* V7.9.4.207 attachments: small pictures in a grid (loaded when seen) and the in-app picture viewer (no new window) */
.ofv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ofv-th { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--ds-border, rgba(255,255,255,.18)); background: rgba(255,255,255,.06) center / cover no-repeat; cursor: pointer; padding: 0; }
.ofv-th span { position: absolute; top: 4px; inset-inline-start: 4px; min-width: 20px; padding: 0 5px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; line-height: 18px; }
.ofv-th:not(.ok)::after { content: "…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ds-text-3, #8aa0c0); }
.ofv-th.bad::after { content: "✗"; color: #ff8a80; }
.ofv-pdf { grid-column: 1 / -1; padding: 10px; border-radius: 10px; border: 1px solid var(--ds-border, rgba(255,255,255,.18)); background: rgba(255,255,255,.05); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.ivw { position: fixed; inset: 0; z-index: 400; background: rgba(4, 10, 24, .96); display: flex; flex-direction: column; }
body.ivw-open { overflow: hidden; }
.ivw-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; color: #fff; }
.ivw-n { font-weight: 700; direction: ltr; }
.ivw-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; font-size: 13px; }
.ivw-x, .ivw-dl { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 18px; text-decoration: none; cursor: pointer; }
.ivw-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; overflow: auto; touch-action: pinch-zoom pan-x pan-y; }
.ivw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ivw-wait { position: absolute; color: #cfd8e6; }
.ivw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; cursor: pointer; }
.ivw-prev { right: 8px; } .ivw-next { left: 8px; }
