/* ============================================================
   WKU-PRS Custom Theme — ወልቂጤ ዩኒቨርሲቲ የዕቅድና ሪፖርት ሥርዓት
   ============================================================ */
:root {
  --primary: #0b6e4f;
  --primary-dark: #07573e;
  --primary-light: #e7f5ef;
  --accent: #f2a900;
  --accent-dark: #d18f00;
  --ink: #1b2430;
  --ink-soft: #4a5a6a;
  --muted: #5f6b78;
  --line: #e3e9ef;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --danger: #c0392b;
  --warning: #b9770a;
  --success: #2e9e6b;
  --info: #3a7ec9;
  --sidebar-bg: #083a2b;
  --sidebar-text: #cfe8de;
  --sidebar-active: #f2a900;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 42, 67, .06), 0 4px 16px rgba(16, 42, 67, .06);
  --font-head: "Noto Sans Ethiopic", "Inter", sans-serif;
  --font-body: "Noto Sans Ethiopic", "Inter", sans-serif;
  --font-size: 14px;
  --letter-spacing: 0em;
  --layout-max: 100%;
  --grid-gap: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--font-size);
  letter-spacing: var(--letter-spacing);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 .5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 272px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0a4a34 0%, var(--sidebar-bg) 30%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: transform .25s ease;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #ffc53d);
  color: #1b2430; font-weight: 800; font-size: 22px;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-logo-img {
  width: 50px; height: 50px; border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text strong { display: block; font-size: .95rem; color: #fff; line-height: 1.3; }
.brand-text span { font-size: .72rem; color: var(--sidebar-text); display: block; line-height: 1.35; }
.brand-motto {
  display: block; font-style: normal; font-size: .68rem;
  color: var(--accent); margin-top: 2px; letter-spacing: .02em;
}

.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .brand { padding: 16px 10px; justify-content: center; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-title,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .fy-chip span { display: none; }
.sidebar.collapsed .brand-logo-img { width: 44px; height: 44px; }
.sidebar.collapsed .nav-link { justify-content: center; font-size: 1.05rem; padding: 10px; }
.sidebar.collapsed .side-nav { padding: 10px 8px 20px; }
.sidebar.collapsed .fy-chip { justify-content: center; padding: 8px; }
.sidebar.collapsed .footer { display: none; }
@media (min-width: 961px) { .sidebar { transition: width .2s ease, transform .25s ease; overflow: hidden; } }

.side-nav { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.nav-section { margin-bottom: 14px; }
.nav-title {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(207,232,222,.55); padding: 8px 10px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-text); padding: 9px 10px; border-radius: 14px;
  font-size: .9rem; margin-bottom: 4px; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  transform: translateX(2px);
}
.nav-link.active {
  background: rgba(242,169,0,.20);
  color: var(--accent);
  font-weight: 700;
}
.nav-ico {
  width: 24px; text-align: center; font-size: 1.1rem;
  color: inherit;
}
.nav-link.active .nav-ico,
.nav-link:hover .nav-ico {
  transform: scale(1.05);
}
.nav-text {
  flex: 1;
}
.nav-unit { font-size: .85rem; }

.sidebar-foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.fy-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 10px;
  font-size: .78rem; color: var(--sidebar-text);
}
.fy-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(46,158,107,.25); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
}
.topbar-title h1 { margin: 0; font-size: 1.12rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-weight: 700; display: grid; place-items: center;
}
.user-meta strong { display: block; font-size: .85rem; line-height: 1.2; }
.user-meta span { font-size: .72rem; color: var(--muted); }

.content { padding: 22px; flex: 1; max-width: var(--layout-max); width: 100%; margin: 0 auto; }
.footer {
  border-top: 1px solid var(--line); padding: 12px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .75rem; color: var(--muted);
  background: var(--surface);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.footer-brand strong { color: var(--ink-soft); }

.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
.overlay.show { display: block; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .content { padding: 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary); color: #fff; border: 1px solid transparent;
  padding: 9px 16px; border-radius: 9px; font-size: .86rem; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .1s; font-family: var(--font-body);
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 12px 22px; font-size: .95rem; }
.btn-sm { padding: 6px 11px; font-size: .78rem; border-radius: 7px; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: #1b2430; }
.btn-accent:hover { background: var(--accent-dark); color: #1b2430; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b93636; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cards & panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 18px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); margin: -18px -20px 16px;
  padding: 14px 20px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, #fbfdfc, #f4f8f6);
}
.card-head h2 { margin: 0; font-size: 1.02rem; }
.card-title { font-weight: 700; color: var(--primary-dark); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.stat-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-ico.green { background: var(--primary-light); color: var(--primary); }
.stat-ico.gold { background: #fdf3d8; color: var(--accent-dark); }
.stat-ico.blue { background: #e8f1fb; color: var(--info); }
.stat-ico.red { background: #fdeaea; color: var(--danger); }
.stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; font-family: var(--font-head); }
.stat-label { font-size: .8rem; color: var(--muted); }
/* -------------------- Admin/management cards -------------------- */
.manage-card .card-head { display: flex; align-items: flex-start; gap: 12px; }
.manage-card .stat-ico { width: 40px; height: 40px; font-size: 17px; margin-top: 2px; }
.manage-card h2 { margin: 0; font-size: 1rem; }
.manage-card .card-stat { font-size: .8rem; font-weight: 600; margin-top: 3px; }
.manage-card .card-stat.s-green { color: var(--primary); }
.manage-card .card-stat.s-gold { color: var(--accent-dark, #b0892a); }
.manage-card .card-stat.s-blue { color: var(--info, #1c86b4); }
.manage-card .card-stat.s-red { color: var(--danger, #c0392b); }
.manage-card .card-stat.s-muted { color: var(--muted, #7b8a86); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }
table.data {
  width: 100%; border-collapse: collapse; background: var(--surface); font-size: .86rem;
}
table.data th {
  text-align: left; background: #f6f9f7; color: var(--ink-soft);
  padding: 10px 12px; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 2px solid var(--line); white-space: normal; overflow-wrap: break-word;
  position: relative;
}

/* ---- Vivid interactive header (Table 4) ---- */
table.data thead.thead-vivid {
  background: linear-gradient(100deg, #06452f, #0b6e4f 25%, #0f9c7a 50%, #1c86b4 75%, #06452f);
}
table.data thead.thead-vivid th {
  background: transparent; color: #fff; text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
  transition: filter .15s ease;
}
table.data thead.thead-vivid th:hover { filter: brightness(1.2); }

/* ---- Thin vertical column lines for Table 4 ---- */
table.data:has(> thead.thead-vivid) th,
table.data:has(> thead.thead-vivid) td { border-left: 1px solid #d7dee5; }
table.data:has(> thead.thead-vivid) tr:first-child > th:first-child { border-left: none; }
.th-resize {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 5px; cursor: col-resize; z-index: 5;
}
.th-resize::after {
  content: ""; position: absolute; right: 2px; top: 0; bottom: 0;
  width: 2px; background: transparent; border-radius: 2px;
}
table.data th:hover .th-resize::after { background: var(--primary); }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing table.data th .th-resize::after { background: var(--primary); }

/* ---- Column visibility (hide/unhide) menu ---- */
.cv-wrap { position: relative; display: inline-block; }
.cv-btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; gap: 4px; }
.cv-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 260px; max-height: 340px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(20, 40, 60, .16);
  padding: 10px 12px; display: none; z-index: 80;
}
.cv-wrap.open .cv-menu { display: block; }
.cv-item {
  display: flex; align-items: center; gap: 8px; font-size: .84rem;
  padding: 5px 2px; cursor: pointer; color: var(--ink); font-weight: 500;
}
.cv-item input { accent-color: var(--primary); flex: none; }
.cv-reset {
  margin-top: 8px; width: 100%; background: none; border: 0; cursor: pointer;
  font-size: .78rem; color: var(--muted); text-decoration: underline; padding: 2px;
}
.cv-reset:hover { color: var(--primary-dark); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fbfdfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---- Annex tables: thin grid + zebra rows ---- */
table.data.annex-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data.annex-table thead th {
  background: #eef4f0; color: var(--ink-soft); text-align: center;
  padding: 7px 10px; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow-wrap: normal;
  border: 1px solid #cdd6dd; border-bottom-width: 2px; border-bottom-color: #b5c1ca;
}
table.data.annex-table thead tr:first-child th { border-top: none; }
table.data.annex-table thead tr:first-child th:first-child { border-left: none; }
table.data.annex-table thead th.rowhead { text-align: left; white-space: normal; overflow-wrap: break-word; }
table.data.annex-table thead tr:first-child th:last-child,
table.data.annex-table tbody td.total-cell { background: #e8f0f4; font-weight: 700; }
table.data.annex-table tbody td {
  border: 1px solid #dfe6ea; padding: 6px 10px; vertical-align: middle; text-align: right;
}
table.data.annex-table tbody td:nth-child(1) { text-align: center; }
table.data.annex-table tbody td:nth-child(2) { text-align: left; }
table.data.annex-table tbody tr:nth-child(odd) { background: #ffffff; }
table.data.annex-table tbody tr:nth-child(even) { background: #f2f7f4; }
table.data.annex-table tbody tr:hover { background: #eaf3ef; }
table.data.annex-table .cell-input {
  width: 78px; padding: 4px 6px; font-size: .84rem;
  border: 1px solid #d8e0e5; border-radius: 4px; background: #fff; text-align: right;
}
table.data.annex-table .cell-input:hover { border-color: #c3ccd4; }
table.data.annex-table .cell-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(11,110,79,.14); outline: none; }

/* ---- Report detail: editable columns (ክንውን / ወጪ) highlighted gray ---- */
table.data.items-table td[data-field="actual_value"],
table.data.items-table td.budget-cell { background: #f3f4f5; }
table.data.items-table td[data-field="actual_value"]:hover,
table.data.items-table td.budget-cell:hover { background: #ebeef0; }
table.data.items-table td[data-field="actual_value"].editing { background: #fffbe8 !important; box-shadow: inset 0 0 0 1px var(--primary); }
table.data.items-table td[data-field="actual_value"].saving { opacity: .55; }
table.data.items-table .budget-cell input[data-field="budget_spent"] { background: #fff; }

/* ---- Sticky header for report detail table ---- */
.table-wrap:has(> #perf-table) { overflow: visible; }
#perf-table thead th {
  position: sticky;
  background: linear-gradient(180deg, #06452f, #0b6e4f 45%, #0f9c7a);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  border-bottom: 2px solid #06452f;
}
#perf-table thead tr:first-child th {
  top: var(--perf-sticky-top, 0px);
  z-index: 11;
}
#perf-table thead tr:last-child th {
  top: calc(var(--perf-sticky-top, 0px) + var(--perf-row1-h, 48px)); /* height of first header row */
  z-index: 10;
}

/* ---- Sticky header for plan items table ---- */
.table-wrap:has(> table.items-table) { 
  overflow: visible; 
  width: 100%; 
  margin-left: -22px; 
  margin-right: -22px; 
  padding-left: 22px; 
  padding-right: 22px; 
}
table.data.items-table thead th {
  position: sticky;
  background: linear-gradient(180deg, #06452f, #0b6e4f 45%, #0f9c7a);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  border-bottom: 2px solid #06452f;
}
table.data.items-table thead tr:first-child th {
  top: var(--plan-sticky-top, 0px);
  z-index: 11;
}
table.data.items-table thead tr:last-child th {
  top: calc(var(--plan-sticky-top, 0px) + var(--plan-row1-h, 48px)); /* height of first header row */
  z-index: 10;
}
.table-wrap { overflow-x: auto; }

/* ---- Vertical column borders for the whole report table ---- */
#perf-table th,
#perf-table td {
  border-left: 1px solid #d7dee5;
}
#perf-table tr:first-child > th:first-child,
#perf-table tbody tr > td:first-child {
  border-left: none;
}
#perf-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* ---- Column highlight for editable columns (ክንውን current quarter & ወጪ) ---- */
/* ክንውን (current quarter) — blue tint */
#perf-table thead th.col-editable,
#perf-table tbody td.mq-act.mq-current,
#perf-table tbody td.cell-spent {
  border-left: 2px solid #60a5fa;
  border-right: 2px solid #60a5fa;
}
#perf-table thead th.col-editable {
  background: #dbeafe;
  color: #1e3a8a;
  border-bottom: 2px solid #2563eb;
}
#perf-table tbody td.mq-act.mq-current,
#perf-table tbody td.cell-spent {
  background: #eff6ff;
}
#perf-table tbody tr:hover td.mq-act.mq-current,
#perf-table tbody tr:hover td.cell-spent { background: #dbeafe; }

/* ወጪ (ብር) — የአምዱ መስመርና ራስ ቀለም ከላይ በላይኛው ደንብ በሁለቱም ይሸፈናል */

/* ---------- Inline items grid ---------- */
table.data.striped tbody tr.row-shade { background: #eef4f7; }
table.data.striped tbody tr.row-shade:hover { background: #e6f0f4; }

/* ---------- Detail table zebra striping ---------- */
table.data.zebra tbody tr.row-main { background: #eef3ef !important; border-left: 3px solid var(--primary, #0b6e4f); }
table.data.zebra tbody tr.row-main:hover { background: #e6eeea !important; }
table.data.zebra tbody tr:nth-child(odd):not(.row-main) { background: #fbfdff !important; }
table.data.zebra tbody tr:nth-child(even):not(.row-main) { background: #f0f6f3 !important; }
table.data.zebra tbody tr.row-main.row-own { background: #f7ead6 !important; border-left: 3px solid #d9943a; }
table.data.zebra tbody tr.row-main.row-inherited { background: #e4effa !important; border-left: 3px solid #4a90d9; }
table.data.zebra tbody tr.row-main.row-detail { background: #ccefd9 !important; border-left: 3px solid #1f9e56; }
table.data.zebra tbody tr.row-own:nth-child(odd):not(.row-main) { background: #fbf3e7 !important; }
table.data.zebra tbody tr.row-own:nth-child(even):not(.row-main) { background: #f6e8d3 !important; }
table.data.zebra tbody tr.row-inherited:nth-child(odd):not(.row-main) { background: #f0f7ff !important; }
table.data.zebra tbody tr.row-inherited:nth-child(even):not(.row-main) { background: #e3eefb !important; }
table.data.zebra tbody tr.row-detail:nth-child(odd):not(.row-main) { background: #d9f2e4 !important; border-left: 3px solid #1f9e56; }
table.data.zebra tbody tr.row-detail:nth-child(even):not(.row-main) { background: #c4e8d3 !important; border-left: 3px solid #1f9e56; }table.data td.center { text-align: center; vertical-align: middle; }
table.data td.hidden { display: none; }
table.data .num-inp { width: 74px; }
table.data .txt-inp { min-width: 240px; width: 100%; }
table.data .sub-inp { min-width: 220px; }
table.data tr.row-flash td { background: #fff3c4 !important; }
table.data tr.row-flash td { animation: rowflash 2.4s ease; }
@keyframes rowflash { 0% { background: #ffe08a; } 100% { background: #fff3c4; } }
table.data .sel-goal { min-width: 190px; max-width: 240px; }
table.data .sel-parent { min-width: 150px; }
table.data .sel-measure { min-width: 118px; }
table.data input, table.data select { padding: 5px 8px; }
table.data tr.row-removed td { opacity: .4; }
table.data tr.row-removed td .txt-inp { text-decoration: line-through; }
table.data .sub-cell { display: flex; align-items: center; gap: 6px; }
table.data .sub-cell .sub-inp { flex: 1; min-width: 160px; }
table.data .sub-cell .btn-xs { white-space: nowrap; }
table.data tr.goal-head td {
  background: var(--primary, #0b6e4f); color: #fff;
  font-weight: 700; font-size: .84rem; letter-spacing: .02em;
  padding: 8px 12px; border-bottom: 2px solid rgba(255,255,255,.25);
}
table.data tr.goal-head .goal-head-tag {
  display: inline-block; margin-right: 8px; padding: 1px 8px;
  border-radius: 999px; background: rgba(255,255,255,.22); font-size: .72rem;
}
table.data.striped tbody tr.goal-head:hover { background: var(--primary, #0b6e4f); }
table.data tr.goal-head select.sel-goal-head {
  background: rgba(255,255,255,.95); color: #0b3d2e; border: none; border-radius: 6px;
  padding: 4px 8px; margin-right: 8px; font-weight: 600; max-width: 240px;
}
table.data .goal-head-wt { font-weight: 400; opacity: .9; margin-left: 4px; }
table.data tr.fa-head td {
  background: #134e3a; color: #fff;
  font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  padding: 6px 12px; border-bottom: 2px solid rgba(255,255,255,.18);
}
table.data tr.fa-head .goal-head-tag { background: rgba(255,255,255,.22); }
table.data tr.fa-sec-row td {
  background: #134e3a; color: #fff;
  font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  padding: 8px 12px; border-bottom: 2px solid rgba(255,255,255,.18);
}
table.data tr.fa-sec-row .band-toggle { color: #fff; border-color: rgba(255,255,255,.45); }
.fa-banner {
  background: #134e3a; color: #fff; font-weight: 600; font-size: .85rem;
  letter-spacing: .02em; padding: 8px 14px; border-radius: 8px;
  margin: 12px 0 4px;
}
table.data .sel-executor { min-width: 150px; max-width: 190px; }
.executor-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 1; }
.executor-head .eh-btns { display: flex; gap: 14px; margin-left: 16px; }
.executor-head .eh-count { font-size: .8rem; color: var(--muted, #607080); margin-right: 4px; min-width: 46px; }
.executor-head .eh-count.has-sel { color: var(--accent, #0b6e4f); font-weight: 600; }
.executor-head button.eh-btn { font-size: .78rem; padding: 4px 14px; border-radius: 6px; cursor: pointer; font-family: inherit; transition: background .15s, color .15s, border-color .15s, opacity .15s; }
/* — "ሁሉንም ምረጥ" : አንዳች (ንጹር ምረጫ ሲሆን ንቁ ሃይል) — */
.executor-head button.eh-all { border: 1px solid var(--accent, #0b6e4f); background: var(--accent, #0b6e4f); color: #fff; }
.executor-head button.eh-all:hover { background: #095a41; border-color: #095a41; }
.executor-head button.eh-all.is-idle { background: #fff; color: var(--accent, #0b6e4f); opacity: .65; }
/* — "አጽዳ" : ሠራችር — */
.executor-head button.eh-none { border: 1px solid #b9c3cc; background: #fff; color: #54626f; }
.executor-head button.eh-none:hover { background: var(--danger, #b03a2e); border-color: var(--danger, #b03a2e); color: #fff; }
.executor-head button.eh-none.is-idle { background: #fff; color: #a9b3bc; border-color: var(--line); opacity: .6; cursor: default; }
.executor-head button.eh-btn.is-idle:hover { transform: none; }
.executor-rows-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfd; padding: 2px; }
table.executor-rows { width: 100%; border-collapse: collapse; }
table.executor-rows td { padding: 5px 10px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
table.executor-rows tr:last-child td { border-bottom: none; }
table.executor-rows tr:hover { background: var(--bg); }
table.executor-rows .erx-check { width: 30px; text-align: center; padding-right: 0; }
table.executor-rows .erx-label { text-align: left; }
table.data .m-checkbox-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfd; max-height: 180px; overflow: auto; }
table.data .m-check { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
table.data .sub2-inp { min-width: 180px; }

/* ---------- Badges / status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.st-draft { background: #eef1f4; color: #5c6b7a; border-color: #dde3ea; }
.st-submitted { background: #fdf3d8; color: #9a6b00; border-color: #f5dfa8; }
.st-approved { background: #e2f4ec; color: #17784e; border-color: #bfe6d4; }
.st-rejected { background: #fdeaea; color: #b03030; border-color: #f5c4c4; }
.st-published { background: #e8f1fb; color: #2a6cb0; border-color: #c4dcf3; }
.st-pending { background: #f3e8fd; color: #6b21a8; border-color: #e2ccf7; }
.st-accepted { background: #e8f4ff; color: #1d5fa0; border-color: #c5e0f7; }
.st-distributed { background: #eef7e2; color: #4a7a10; border-color: #d5ecc0; }
.badge-pill { background: var(--primary-light); color: var(--primary-dark); }

.ach-na { color: var(--muted); }
.ach-excellent { color: #0b6e1f; font-weight: 700; }
.ach-good { color: #1e8a2e; font-weight: 700; }
.ach-fair { color: #3fa83f; font-weight: 600; }
.ach-poor { color: #b07500; font-weight: 600; }
.ach-bad { color: var(--danger); font-weight: 700; }

/* ── የበጀት አጠቃቀም (budget consumption) ምድቦችና ማጠቃለያ አሞሌ ── */
.budget-na { color: var(--muted); }
.budget-equal { color: #0b6e1f; font-weight: 700; }
.budget-below { color: #b07500; font-weight: 600; }
.budget-above { color: var(--danger); font-weight: 700; }
.bbar { display: flex; align-items: center; gap: 10px; }
.budget-bar { flex: 1; min-width: 0; height: 10px; background: #edf1f5; border-radius: 999px; overflow: hidden; }
.budget-bar-fill { display: block; height: 100%; border-radius: 999px; background: #0b6e1f; transition: width .3s; }
.budget-bar-fill.budget-fill-below { background: #b07500; }
.budget-bar-fill.budget-fill-above { background: #c0392b; }
.budget-cell-num { font-variant-numeric: tabular-nums; }
.budget-line { display: flex; flex-wrap: nowrap; border: 1px solid var(--border, #dee2e6); border-radius: 8px; background: #fff; overflow: hidden; }
.budget-line .budget-item { flex: 1 1 0; display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; white-space: nowrap; border-left: 1px solid var(--border, #dee2e6); }
.budget-line .budget-item:first-child { border-left: 0; }
.budget-summary .budget-grid { display: flex; flex-wrap: wrap; gap: 24px; padding: 4px 16px 12px; }
.budget-summary .bgrid-label { font-size: .8rem; color: var(--muted); }
.budget-summary .bgrid-num { font-size: 1.15rem; font-weight: 700; }
.budget-summary .bbar { padding: 0 16px 12px; }
.budget-summary .budget-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 16px 14px; font-size: .85rem; }

/* progress bar */
.progress { height: 8px; background: #edf1f5; border-radius: 999px; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.progress.good > span { background: var(--success); }
.progress.fair > span { background: var(--warning); }
.progress.poor > span { background: var(--danger); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-row.inline { flex-direction: row; align-items: center; gap: 10px; }
.form-row label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.form-row .req::after { content: " *"; color: var(--danger); }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .88rem; background: #fff; color: var(--ink);
  font-family: var(--font-body); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,110,79,.12);
}
textarea { min-height: 90px; resize: vertical; }
/* የማይታረሙ (read-only/disabled) ሳጥኖች እንደ እንቅስቃሴ-የሌለው (inactive) ይታያሉ */
input[readonly], textarea[readonly],
input:disabled, select:disabled, textarea:disabled {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  -webkit-text-fill-color: var(--muted);
}
input[readonly]:focus, textarea[readonly]:focus,
input:disabled:focus, select:disabled:focus, textarea:disabled:focus {
  border-color: var(--line);
  box-shadow: none;
}
.form-errors { color: var(--danger); font-size: .78rem; margin-top: 2px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.checkbox-line input { width: auto; }
.field-help { font-size: .74rem; color: var(--muted); }

/* ---------- Plan start mode selector ---------- */
.plan-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-mode label {
  display: block; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px;
  cursor: pointer; background: #fff; position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.plan-mode label:hover { border-color: var(--primary); }
.plan-mode input { position: absolute; opacity: 0; pointer-events: none; }
.plan-mode label:has(input:checked) {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, .12);
}
.plan-mode .pm-title { display: block; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.plan-mode .pm-desc { display: block; font-size: .76rem; color: var(--muted); line-height: 1.5; }

/* ---------- Alerts ---------- */
.flash-stack { margin-bottom: 16px; }
.alert {
  padding: 11px 15px; border-radius: 10px; font-size: .86rem; margin-bottom: 8px;
  border: 1px solid transparent;
}
.alert-success { background: #e2f4ec; color: #17784e; border-color: #bfe6d4; }
.alert-danger { background: #fdeaea; color: #b03030; border-color: #f5c4c4; }
.alert-warning { background: #fdf3d8; color: #9a6b00; border-color: #f5dfa8; }
.alert-info { background: #e8f1fb; color: #2a6cb0; border-color: #c4dcf3; }
.text-success { color: #17784e; }
.form-static {
  padding: 9px 12px; border: 1px solid var(--border, #dde3ea); border-radius: 10px;
  background: var(--card-bg, #fff); color: var(--text, #222);
}

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(16,42,67,.14); padding: 6px; z-index: 50;
  display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .86rem; color: var(--ink); }
.dropdown-menu a:hover { background: var(--bg); }
.dropdown-menu a.danger { color: var(--danger); }
.dd-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-head strong { display: block; font-size: .9rem; }
.dd-head span { font-size: .75rem; color: var(--muted); }
.icon-btn {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  width: 36px; height: 36px; font-size: 1rem; cursor: pointer; color: var(--ink-soft);
  display: grid; place-items: center; font-family: var(--font-body);
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }

/* ---------- Utilities ---------- */
.text-muted { color: var(--muted); }
.text-sm { font-size: .8rem; }
.text-lg { font-size: 1.1rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }

/* org tree */
.org-tree ul { list-style: none; margin: 4px 0 4px 0; padding: 0 0 0 36px; }
.org-tree > ul { padding-left: 0; }
.org-tree li { position: relative; }
.org-tree li::before {
  content: ""; position: absolute; left: -20px; top: 0; bottom: 0;
  border-left: 2px solid var(--line);
}
.org-tree li::after {
  content: ""; position: absolute; left: -20px; top: 24px;
  width: 16px; border-top: 2px solid var(--line);
}
.org-tree li:last-child::before { bottom: auto; height: 26px; }

.org-node {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  margin-bottom: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.org-node .type-tag {
  font-size: .68rem; background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 8px; border-radius: 999px; font-weight: 700; flex-shrink: 0;
}
.org-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.org-actions form { margin: 0; }
.org-actions .btn-sm { padding: 3px 8px; font-size: .72rem; line-height: 1; }
.org-node form.grow { min-width: 0; }
.org-node .org-open {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: var(--font-body); font-size: .92rem; color: var(--primary); text-align: left;
}
.org-node .org-open:hover { color: var(--primary-dark); text-decoration: underline; }
.org-node .org-open strong { color: var(--ink); }
.org-node .org-open:hover strong { color: var(--primary); text-decoration: underline; }

/* user-count badge next to unit name on /org */
.user-count {
  font-size: .7rem; font-weight: 700; margin-left: 6px; padding: 0 6px;
  border-radius: 999px; white-space: nowrap; vertical-align: middle;
  text-decoration: none; cursor: pointer;
}
.user-count:hover { text-decoration: underline; }
.user-count.has-users { color: #0b6e4f; background: rgba(11,110,79,.12); }
.user-count.no-users { color: #c0392b; background: rgba(192,57,43,.10); }

/* org tree collapse/expand caret */
.org-caret {
  border: 0; background: transparent; cursor: pointer; flex-shrink: 0;
  width: 22px; height: 22px; padding: 0; border-radius: 6px;
  color: var(--primary); font-size: .7rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.org-caret::before { content: "▶"; }
.org-caret:hover { background: var(--primary-light); }
.org-collapsed > .org-node .org-caret { transform: rotate(90deg); }


/* plan value split (split.html) */
.split-item-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  cursor: pointer; user-select: none; padding: 2px;
}
.split-item-head:hover { opacity: .85; }
.split-toggle {
  border: 0; background: transparent; cursor: pointer; padding: 0;
  width: 20px; height: 20px; border-radius: 5px; color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease; flex-shrink: 0;
}
.split-toggle::before { content: "▶"; font-size: .65rem; }
.split-card.split-collapsed .split-toggle { transform: rotate(90deg); }
.split-body.is-collapsed { display: none; }
.split-table .split-inp {
  width: 88px; padding: 4px 6px; font-size: .8rem; text-align: right;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.split-table .split-inp:focus { outline: none; border-color: var(--primary); }
.split-total-row th { text-align: right; }
.split-total { font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.split-total.ok { color: #0b6e4f; background: rgba(11,110,79,.12); }
.split-total.bad { color: #c0392b; background: rgba(192,57,43,.12); }
.split-parent { white-space: nowrap; }


/* empty state */
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 12px; background: var(--surface);
}
.empty .empty-ico { font-size: 2rem; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
.timeline li.act-reject::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.timeline .tl-time { font-size: .74rem; color: var(--muted); }

/* print */
@media print {
  .sidebar, .topbar, .footer, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { font-size: 12px; }
  .table-wrap { overflow: visible; }
  table.data { width: 100%; border-collapse: collapse; font-size: 10px; }
  table.data[data-resizable] { table-layout: auto !important; }
  table.data[data-resizable] th { width: auto !important; }
  table.data th, table.data td { border: 1px solid #bbb !important; padding: 5px 7px; }
  table.data thead { display: table-header-group; }
  table.data tr { break-inside: avoid; }
  .letterhead { break-inside: avoid; }
}

/* quarter stepper */
.quarters { display: flex; gap: 8px; flex-wrap: wrap; }
.quarter-chip {
  flex: 1; min-width: 110px; text-align: center; padding: 10px 8px;
  border: 2px solid var(--line); border-radius: 10px; font-size: .78rem;
  background: var(--surface);
}
.quarter-chip.done { border-color: var(--success); background: var(--primary-light); color: var(--primary-dark); }
.quarter-chip.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,169,0,.18); }
.quarter-chip .q-num { display: block; font-size: 1.1rem; font-weight: 800; }

/* report header block */
.report-header {
  border: 2px solid var(--primary); border-radius: 12px; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #f3faf7, #fff);
  margin-bottom: 18px;
}
.report-header .rh-title { font-weight: 800; color: var(--primary-dark); font-size: 1rem; }
.letterhead { text-align: center; border-bottom: 3px double var(--primary); padding-bottom: 10px; margin-bottom: 14px; }
.letterhead h1 { margin: 0; color: var(--primary-dark); font-size: 1.1rem; }
.letterhead h2 { margin: 0; font-size: .9rem; color: var(--ink-soft); font-weight: 500; }

.h-item { padding: 2px 0; }
.h-sub { padding-left: 22px !important; position: relative; }
.h-sub::before { content: "↳"; position: absolute; left: 4px; color: var(--primary); }
.h-sub2 { padding-left: 44px !important; }
.row-own { background: #fdf3e7 !important; }
.row-inherited { background: #f0f7ff !important; }
.row-detail { background: #d9f2e4 !important; border-left: 3px solid #1f9e56; }
.tag-own { background: #e8b26b; color: #3a2a0e; }
.tag-inherited { background: #b9d8f5; color: #12324f; }
.tag-detail { background: #1f9e56; color: #ffffff; }
.tag-dot-own, .tag-dot-inherited, .tag-dot-detail { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.tag-dot-own { background: #e8b26b; }
.tag-dot-inherited { background: #b9d8f5; }
.tag-dot-detail { background: #1f9e56; }
.rich-text { font-family: "Times New Roman", "Noto Serif Ethiopic", Georgia, serif; font-size: 12pt; line-height: 2; line-height: 2; color: inherit; }
.rich-text p { margin: 0 0 8px; }
.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4, .rich-text h5, .rich-text h6 { font-weight: 700; color: var(--ink-strong, #111); line-height: 1.35; margin: 16px 0 8px; }
.rich-text h1 { font-size: 1.55rem; }
.rich-text h2 { font-size: 1.3rem; }
.rich-text h3 { font-size: 1.12rem; }
.rich-text h4 { font-size: 1rem; }
.rich-text h5 { font-size: 0.92rem; }
.rich-text h6 { font-size: 0.85rem; }
.rich-text blockquote { border-left: 4px solid var(--primary); margin: 10px 0; padding: 4px 14px; color: var(--ink-soft, #445); font-style: italic; }
.rich-text pre { background: #f5f7f9; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-family: Consolas, "Courier New", monospace; font-size: .85em; }
.rich-text code { background: #f1f4f6; padding: 2px 5px; border-radius: 4px; font-family: Consolas, "Courier New", monospace; font-size: .9em; }
.rich-text ul, .rich-text ol { padding-left: 1.4em; margin: 0 0 8px; }
.rich-text li { margin: 3px 0; }
.rich-text li[data-list="checked"] { list-style: none; }
.rich-text li[data-list="checked"]::before { content: "☑ "; color: var(--primary); }
.rich-text a { color: var(--primary); text-decoration: underline; }
.rich-text img { max-width: 100%; }
.rich-text .ql-size-small { font-size: 0.75em; }
.rich-text .ql-size-large { font-size: 1.5em; }
.rich-text .ql-size-huge { font-size: 2.5em; }
.rich-text .ql-font-serif { font-family: "Noto Serif Ethiopic", Georgia, "Times New Roman", serif; }
.rich-text .ql-font-monospace { font-family: Consolas, "Courier New", monospace; }
.rich-text .ql-align-center { text-align: center; }
.rich-text .ql-align-right { text-align: right; }
.rich-text .ql-align-justify { text-align: justify; }
.rich-text u { text-decoration: underline; }
.rich-text s { text-decoration: line-through; }
.goal-group-row td { background: var(--primary); color: #fff; font-weight: 700; }
.cell-input { width: 92px; padding: 5px 6px; border: 1px solid #cfd6dd; border-radius: 5px; text-align: right; }
.total-cell { font-weight: 700; }

/* ---------- Performance buckets ---------- */
.perf-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.perf-best { background: #d2f0d6; color: #0b6e1f; border: 1px solid #a8d8b5; }
.perf-good { background: #daf0dd; color: #1e8a2e; border: 1px solid #aedbb6; }
.perf-normal { background: #e6f4e3; color: #3fa83f; border: 1px solid #bce5b4; }
.perf-worst { background: #fdf3d0; color: #b07500; border: 1px solid #f5dfa0; }
.perf-low { background: #fdeaea; color: #c0392b; border: 1px solid #f5c4c4; }
.perf-na { background: #eef1f4; color: #5c6b7a; border: 1px solid #dde3ea; }

/* Progress bar performance colors */
.progress-bar.perf-best { background-color: #0b6e1f; }
.progress-bar.perf-good { background-color: #1e8a2e; }
.progress-bar.perf-normal { background-color: #3fa83f; }
.progress-bar.perf-worst { background-color: #b07500; }
.progress-bar.perf-low { background-color: #c0392b; }
.progress-bar.perf-na { background-color: #5c6b7a; }

/* ---------- Leaderboard ---------- */
.lb-medal { font-size: 1.05rem; }
.lb-dl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lb-dl .btn { margin: 0; }
.lb-medal.gold { filter: drop-shadow(0 1px 1px rgba(190,140,0,.4)); }
.lb-medal.silver { filter: drop-shadow(0 1px 1px rgba(120,130,140,.4)); }
.lb-medal.bronze { filter: drop-shadow(0 1px 1px rgba(160,90,40,.4)); }

.lb-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.lb-pod {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 3px rgba(20,40,60,.05); position: relative; overflow: hidden;
}
.lb-pod-1 { border-color: #e3c260; background: linear-gradient(135deg, #fff8e1, #fff); }
.lb-pod-2 { border-color: #cfd6dc; background: linear-gradient(135deg, #f2f4f6, #fff); }
.lb-pod-3 { border-color: #ddb08b; background: linear-gradient(135deg, #fdf1e7, #fff); }
.lb-pod-medal { font-size: 1.6rem; line-height: 1; }
.lb-pod-main { flex: 1; min-width: 0; }
.lb-pod-main strong { display: block; font-size: .9rem; }
.lb-pod-val { font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); white-space: nowrap; }
.lb-pod-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.06); }
.lb-pod-bar span { display: block; height: 100%; background: var(--primary); }
.lb-pod-1 .lb-pod-bar span { background: var(--accent); }

.lb-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.lb-stat {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: .78rem; color: var(--muted);
}
.lb-stat strong { font-size: 1.05rem; color: var(--ink); }
.lb-stat span { display: flex; flex-direction: column; }
.lb-st-best { border-color: #a8d8b5; }

.lb-st-best strong { color: #0b6e1f; }

.lb-st-good { border-color: #aedbb6; }

.lb-st-good strong { color: #1e8a2e; }

.lb-st-normal { border-color: #bce5b4; }

.lb-st-normal strong { color: #3fa83f; }

.lb-st-worst { border-color: #f5dfa0; }

.lb-st-worst strong { color: #b07500; }

.lb-st-low { border-color: #f5c4c4; }

.lb-st-low strong { color: #c0392b; }

.lb-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9f7; }
.lb-seg-btn {
  min-width: 52px; padding: 7px 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-soft); font-weight: 600; font-size: .84rem;
  cursor: pointer; font-family: var(--font-body);
}
.lb-seg-btn:hover { background: #eaf1ed; color: var(--ink); }
.lb-seg-btn.current { background: var(--primary); color: #fff; }

.lb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px 10px; }
.lb-tooltip { font-size: .74rem; color: var(--muted); }
.lb-caret {
  border: 0; background: transparent; cursor: pointer; padding: 2px 4px;
  font-size: .72rem; color: var(--primary); border-radius: 6px; vertical-align: middle;
}
.lb-caret:hover { background: var(--primary-light); }
.lb-caret-sp { display: inline-block; width: 18px; }
.lb-unit { display: flex; align-items: center; gap: 6px; }
.lb-ach { white-space: nowrap; }
.lb-bar { display: inline-block; width: 64px; height: 8px; background: #edf1f5; border-radius: 999px; overflow: hidden; margin-right: 8px; vertical-align: middle; }
.lb-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.lb-bar-fill.ach-excellent { background: #0b6e1f; }
.lb-bar-fill.ach-good { background: #1e8a2e; }
.lb-bar-fill.ach-fair { background: #3fa83f; }
.lb-bar-fill.ach-poor { background: #b07500; }
.lb-bar-fill.ach-bad { background: #c0392b; }
#lbTable th { cursor: pointer; user-select: none; }
#lbTable th .lb-sort { color: var(--primary); font-size: .8rem; }

.lb-section { margin-bottom: 8px; }
.lb-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--primary); color: #fff;
  border-radius: 10px 10px 0 0;
}
.lb-section-head h3 { margin: 0; font-size: .92rem; }
.lb-rank { width: 100%; border-collapse: collapse; }
.lb-rank thead th { background: var(--primary-light); }
.lb-group-badge {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  font-size: .66rem; background: var(--primary); color: #fff; border-radius: 999px;
}
.lb-cons .text-xs, .text-xs { font-size: .68rem; opacity: .8; }
.lb-cons { white-space: nowrap; }
.lb-own { white-space: nowrap; }

@media (max-width: 640px) {
  .lb-podium { grid-template-columns: 1fr; }
  .lb-pod { flex-wrap: wrap; }
}

/* ---------- Unit trend indicator ---------- */
.lb-trend { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.lb-trend.up { color: #0b6e1f; }
.lb-trend.down { color: #c0392b; }
.lb-trend.flat { color: var(--muted); }

/* ---------- Organization-level goal breakdown ---------- */
.og-wrap { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 12px; }
.og-fa, .og-goal { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.og-fa > summary, .og-goal > summary {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
  padding: 10px 14px; cursor: pointer; list-style: none; user-select: none;
}
.og-fa > summary { background: var(--primary-light); }
.og-fa > summary::-webkit-details-marker, .og-goal > summary::-webkit-details-marker { display: none; }
.og-fa > summary::before, .og-goal > summary::before { content: "▸"; margin-right: 6px; color: var(--primary); transition: transform .15s; }
.og-fa[open] > summary::before, .og-goal[open] > summary::before { transform: rotate(90deg); }
.og-fa-name, .og-goal-name { display: flex; align-items: center; gap: 6px; }
.og-fa-badges, .og-goal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.og-goal > summary { background: #f6f9f7; border-top: 1px solid var(--line); }
.og-goal { border: none; border-top: 1px solid var(--line); border-radius: 0; }
.og-fa > summary + * { margin-left: 6px; }
.og-obj-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 6px 6px 4px; }
.og-obj { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.og-obj > summary {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
  padding: 8px 12px; cursor: pointer; list-style: none; user-select: none; background: #f9fbfa;
}
.og-obj > summary::-webkit-details-marker { display: none; }
.og-obj > summary::before { content: "▸"; margin-right: 6px; color: var(--primary); transition: transform .15s; }
.og-obj[open] > summary::before { transform: rotate(90deg); }
.og-obj-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.og-obj-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; justify-content: flex-end; }
.og-obj > summary + * { margin: 6px 8px 8px; }
.og-act-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 4px 4px 18px; padding-left: 8px; border-left: 2px solid var(--line); }
.og-act { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.og-act > summary {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
  padding: 7px 12px; cursor: pointer; list-style: none; user-select: none; background: #fbfcfb;
}
.og-act > summary::-webkit-details-marker { display: none; }
.og-act > summary::before { content: "▸"; margin-right: 6px; color: var(--primary); transition: transform .15s; }
.og-act[open] > summary::before { transform: rotate(90deg); }
.og-act > summary + * { margin: 6px 8px 8px; }
.og-act .og-obj-table { margin-left: 18px; }
.og-obj-table { border: 0; }
.og-obj-table th { background: #f3f6f4; }
.og-bullet {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  margin-right: 8px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark);
  font-size: .75rem; font-weight: 700;
}
.og-none { margin: 10px 14px; }

/* ---------- Deadline badges ---------- */.dl-overdue { color: var(--danger); font-weight: 700; }
.dl-due { color: #d05c2a; font-weight: 700; }
.dl-urgent { color: #b07500; font-weight: 600; }
.dl-soon { color: #2a6cb0; font-weight: 600; }
.dl-ok { color: var(--success); font-weight: 600; }

/* ---------- Charts (Chart.js) ---------- */
.chart-box { position: relative; height: 260px; }
.chart-box-sm { height: 220px; }
.chart-box-lg { height: 320px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }

.lb-heat { position: relative; overflow-x: auto; overflow-y: hidden; padding: 0 12px 8px; }
.lb-heat canvas { display: block; }

/* ---------- Insights strip ---------- */
.insights { display: flex; flex-wrap: wrap; gap: 8px; }
.insight {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 10px; font-size: .84rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.insight::before { content: "●"; font-size: .8rem; }
.insight-best::before, .insight-ok::before { color: var(--success); }
.insight-worst::before { color: var(--danger); }
.insight-warn::before { color: var(--warning); }
.insight-info::before { color: var(--info); }
.insight-best, .insight-ok { border-color: rgba(46,158,107,.35); background: var(--primary-light); color: var(--primary-dark); }
.insight-worst { border-color: rgba(214,69,69,.4); background: #fdf0f0; color: #a33; }
.insight-warn { border-color: rgba(232,163,61,.5); background: #fdf7ec; color: #8a5a10; }
.insight-info { border-color: rgba(58,126,201,.35); background: #f0f6fd; color: #2a5d97; }

/* ---------- Fiscal year switcher ---------- */
.fy-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.fy-chip-link {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: .78rem;
  font-weight: 700; text-decoration: none; transition: all .15s;
}
.fy-chip-link:hover { border-color: var(--primary); color: var(--primary); }
.fy-chip-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Notification bell ---------- */
.notif-bell { position: relative; }
.notif-badge {
  position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: .66rem;
  display: grid; place-items: center; padding: 0 4px; font-weight: 700;
}
.dropdown-wide { min-width: 320px; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 8px; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-item.unread:hover { background: #e8f4ee; }
.notif-ico { font-size: .72rem; margin-top: 3px; }
.notif-info { color: #2a6cb0; }
.notif-workflow { color: #9a6b00; }
.notif-deadline { color: #d05c2a; }
.notif-system { color: #5c6b7a; }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body strong { font-size: .85rem; color: var(--ink); }
.notif-body span { font-size: .78rem; color: var(--ink-soft); line-height: 1.35; }
.notif-body small { font-size: .7rem; color: var(--muted); }
.notif-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.notif-item .notif-actions form { margin: 0; }
.dd-empty { padding: 18px; text-align: center; color: var(--muted); font-size: .82rem; }
.dd-footer { padding: 8px 10px 4px; border-top: 1px solid var(--line); text-align: center; }

/* inline form row */
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-inline .input { width: auto; }

/* grid gap follows theme layout mode */
.stat-grid, .card-grid, .grid2, .grid3, .grid4 { gap: var(--grid-gap) !important; }

/* ---------- Table tools (search + filter) ---------- */
.tt-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px 0;
}
.tt-bar .cv-wrap { flex: none; }
.tt-bar .cv-btn { padding: 7px 12px; font-size: .8rem; }
.tt-search {
  flex: 1; min-width: 180px; max-width: 340px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: .82rem; background: var(--surface); color: var(--ink);
  font-family: var(--font-body);
}
.tt-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.tt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-filt {
  padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font-size: .78rem;
  font-family: var(--font-body);
}
.tt-filt:focus { outline: none; border-color: var(--primary); }
.tt-count { margin-left: auto; font-size: .74rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .tt-count { margin-left: 0; width: 100%; }
}

/* ---------- Paginator ---------- */.paginator {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 4px 2px;
}
.pg-info { display: flex; align-items: center; gap: 10px; }
.pg-size {
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: .8rem;
  font-family: var(--font-body);
}
.pg-range { font-size: .78rem; color: var(--muted); }
.pg-pages { display: flex; align-items: center; gap: 5px; }
.pg-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink-soft);
  font-size: .82rem; cursor: pointer; font-family: var(--font-body);
}
.pg-btn:hover:not(:disabled) { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-ell { color: var(--muted); padding: 0 2px; }

/* ---------- Theme customizer panel ---------- */
.theme-panel {
  position: fixed; top: 64px; right: 16px; z-index: 60;
  width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 18px 50px rgba(0,0,0,.18);
  display: none; overflow: hidden; flex-direction: column;
}
.theme-panel.show { display: flex; }
.tp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--primary); color: #fff;
}
.tp-title { font-weight: 800; font-size: .9rem; }
.tp-close {
  background: rgba(255,255,255,.16); border: none; color: #fff; width: 28px; height: 28px;
  border-radius: 7px; cursor: pointer; font-size: .85rem;
}
.tp-close:hover { background: rgba(255,255,255,.28); }
.tp-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--bg); }
.tp-tab {
  flex: 1; padding: 9px 4px; border: none; background: transparent; cursor: pointer;
  font-size: .76rem; color: var(--ink-soft); border-bottom: 2px solid transparent;
  font-family: var(--font-body);
}
.tp-tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); background: var(--surface); }
.tp-body { padding: 14px; overflow-y: auto; }
.tp-color-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tp-ctab {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: .72rem; cursor: pointer; color: var(--ink-soft);
  font-family: var(--font-body);
}
.tp-ctab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 700; }
.tp-grid { display: grid; gap: 10px; }
.tp-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tp-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tp-field-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.tp-field { display: grid; gap: 4px; }
.tp-field label, .tp-title, .tp-glabel { font-family: var(--font-head); }
.tp-field input[type="color"] {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 4px;
  background: transparent; cursor: pointer;
}
.tp-color-value {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--ink); font-size: .82rem; font-family: var(--font-body);
}
.tp-note {
  font-size: .78rem; color: var(--muted); line-height: 1.5; margin-top: 10px;
}
.tp-card {
  text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; overflow: hidden; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tp-card:hover { transform: translateY(-2px); }
.tp-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15,87,83,.12); }
.tp-card-name { display: block; font-size: .76rem; font-weight: 700; color: var(--ink); padding: 10px 10px 0; }
.tp-card-desc { display: block; font-size: .7rem; color: var(--muted); padding: 0 10px 8px; line-height: 1.4; }
.tp-swatches { display: flex; gap: 4px; padding: 0 10px 10px; }
.tp-swatch { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); }
.tp-preview { display: block; height: 52px; padding: 10px; position: relative; }
.tp-pv-sb {
  position: absolute; left: 8px; top: 8px; width: 60%; height: 14px;
  border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.tp-pv-ac {
  position: absolute; right: 8px; top: 8px; width: 14px; height: 14px; border-radius: 4px;
}
.tp-pv-line { position: absolute; left: 8px; height: 5px; width: 78%; border-radius: 3px; }
.tp-pv-line.s2 { top: 24px; }
.tp-pv-line:last-of-type { top: 24px; }
.tp-pv-cards { display: flex; gap: 8px; padding: 10px 8px; }
.tp-pv-c1, .tp-pv-c2 { height: 42px; flex: 1; background: var(--bg); }
.tp-pv-layout { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; }
.tp-pv-lrow { height: 7px; border-radius: 4px; background: var(--primary); opacity: .5; }
.tp-pv-lrow.short { width: 45%; }
.tp-pv-lcols { display: flex; gap: 6px; }
.tp-pv-lcol { height: 26px; border-radius: 4px; background: var(--primary); opacity: .35; }
.tp-pv-lcol2 { height: 26px; border-radius: 4px; background: var(--primary); opacity: .15; }
.tp-pill {
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); cursor: pointer; font-size: .76rem; color: var(--ink);
  font-family: var(--font-body);
}
.tp-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.tp-group { margin-bottom: 12px; }
.tp-glabel { font-size: .72rem; color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.tp-foot {
  padding: 10px 14px; border-top: 1px solid var(--line); font-size: .72rem;
  color: var(--muted); background: var(--bg); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tp-reset { margin-left: auto; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; font-size: .72rem; color: var(--primary); font-family: var(--font-body); }
.tp-reset:hover { background: var(--primary-light); }
@media (max-width: 560px) {
  .theme-panel { top: 56px; right: 8px; width: calc(100vw - 16px); max-width: 100%; }
}

/* ---------- Modal dialog ---------- */
.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(8,24,18,.45);
  z-index: 70; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(8,24,18,.28);
  width: 100%; max-width: 760px;
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  animation: modalIn .16s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfc, #f4f8f6);
  border-radius: 14px 14px 0 0;
  flex: 0 0 auto;
}
.modal-head h3 { margin: 0; font-size: 1rem; }
.modal-close {
  background: none; border: none; font-size: 1.25rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { color: var(--danger); background: #fdeaea; }
.modal-body { padding: 18px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.m-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.m-span-2 { grid-column: 1 / -1; }
.m-quarters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.m-error {
  display: none; background: #fdeaea; color: #b03030; border: 1px solid #f5c4c4;
  border-radius: 8px; padding: 8px 12px; font-size: .82rem; margin-bottom: 12px;
}
.m-error.show { display: block; }
@media (max-width: 560px) {
  .m-form-grid { grid-template-columns: 1fr; }
  .m-quarters { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ---------- Read-only grid (modal-driven CRUD) ---------- */
table.data .cell-text { display: block; padding: 4px 2px; min-height: 20px; font-size: .86rem; }
table.data .cell-text.is-empty { color: var(--muted); opacity: .65; }
table.data .title-text { font-weight: 600; }
table.data td.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
table.data .act-row { display: flex; gap: 4px; flex-wrap: wrap; }
table.data .btn-icon {
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 8px; font-size: .74rem; line-height: 1.4; cursor: pointer;
  color: var(--ink-soft); font-family: var(--font-body); white-space: nowrap;
}
table.data .btn-icon:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
table.data .btn-icon.danger:hover { background: #fdeaea; color: var(--danger); border-color: #f5c4c4; }
table.data .btn-icon.restore:hover { background: var(--primary-light); color: var(--primary-dark); }
table.data .btn-icon.act-sub2 { background: #1f9e56; color: #fff; border-color: #1f9e56; }
table.data .btn-icon.act-sub2:hover { background: #1c8a49; color: #fff; border-color: #1c8a49; }
table.data td.actions-cell { white-space: nowrap; vertical-align: middle; }
table.data tr.row-del td { opacity: .4; }
table.data tr.row-del .cell-text { text-decoration: line-through; }
table.data td.act-cell { min-width: 200px; }
table.data .act-text { display: inline-block; }
table.data .act-text.act-top { font-weight: 600; }
table.data .act-text.act-indent { padding-left: 22px; position: relative; }
table.data .act-text.act-indent::before {
  content: "↳"; position: absolute; left: 4px; color: var(--primary);
}
table.data [data-field="ind"].h-sub-text { font-weight: 600; }
table.data .exec-cell-text { white-space: normal; }

/* ---------- Detail page record modal (double-click CRUD) ---------- */
table.data tbody tr[data-json] { cursor: pointer; }
.rec-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .35rem; }
.rec-table { width: 100%; border-collapse: collapse; margin: .55rem 0 .2rem; }
.rec-table td { padding: .34rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.rec-table td:first-child { color: var(--muted); width: 42%; font-size: .83rem; white-space: nowrap; }
.rec-children { margin-top: .6rem; border-top: 1px dashed var(--line); padding-top: .5rem; }
.rec-children ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.rec-children li { margin-bottom: .2rem; }
.inline-form { display: inline; }

/* ---------- Quill editor: Ethiopic fonts & sizes ---------- */
.ql-editor {
  font-family: var(--font-body), "Noto Sans Ethiopic", sans-serif;
  font-size: 1rem;
}
.ql-snow .ql-font-abyssinica { font-family: "Abyssinica SIL", serif; }
.ql-snow .ql-font-nyala { font-family: "Nyala", sans-serif; }
.ql-snow .ql-font-noto { font-family: "Noto Sans Ethiopic", sans-serif; }
.ql-snow .ql-font-visual-geez { font-family: "Visual Geez", sans-serif; }
.ql-snow .ql-font-serif { font-family: Georgia, "Times New Roman", serif; }
.ql-snow .ql-font-monospace { font-family: "Courier New", Consolas, monospace; }

.ql-snow .ql-size-10px { font-size: 10px; }
.ql-snow .ql-size-12px { font-size: 12px; }
.ql-snow .ql-size-14px { font-size: 14px; }
.ql-snow .ql-size-16px { font-size: 16px; }
.ql-snow .ql-size-18px { font-size: 18px; }
.ql-snow .ql-size-20px { font-size: 20px; }
.ql-snow .ql-size-24px { font-size: 24px; }
.ql-snow .ql-size-28px { font-size: 28px; }
.ql-snow .ql-size-32px { font-size: 32px; }
.ql-snow .ql-size-40px { font-size: 40px; }
.ql-snow .ql-size-48px { font-size: 48px; }

.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="abyssinica"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="abyssinica"]::before { content: "Abyssinica SIL"; font-family: "Abyssinica SIL", serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="nyala"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="nyala"]::before { content: "Nyala"; font-family: "Nyala", sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="noto"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="noto"]::before { content: "Noto Sans Ethiopic"; font-family: "Noto Sans Ethiopic", sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="visual-geez"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="visual-geez"]::before { content: "Visual Geez"; font-family: "Visual Geez", sans-serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before { content: "Serif"; font-family: Georgia, serif; }
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before { content: "Monospace"; font-family: "Courier New", monospace; }

.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10px"]::before { content: "10"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before { content: "12"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14px"]::before { content: "14"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before { content: "16"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before { content: "18"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before { content: "20"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="24px"]::before { content: "24"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28px"]::before { content: "28"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32px"]::before { content: "32"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="40px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="40px"]::before { content: "40"; }
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="48px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="48px"]::before { content: "48"; }

/* ---------- ስልታዊ ዓላማ (sgoal) band rows ---------- */
table.data tr.sgoal-head td {
  background: #e7f5ef; color: #07573e;
  font-weight: 700; font-size: .84rem;
  padding: 7px 12px; border-bottom: 1.5px solid #bfe3d4;
}
table.data tr.sgoal-head .sgoal-tag {
  display: inline-block; margin-right: 8px; padding: 1px 8px;
  border-radius: 999px; background: #c9ead9; font-size: .72rem;
}
table.data tr.sgoal-head:hover td { background: #ddf0e6; }
/* ---------- ተግባር (activity) band rows ---------- */
table.data tr.act-head td {
  background: #f3f9f5; color: #0a4a35;
  font-weight: 700; font-size: .82rem;
  padding: 6px 12px; border-bottom: 1px solid #d3e9dd;
}
table.data tr.act-head:hover td { background: #e7f3ec; }
/* ---------- በቀጥታ ማስተካከያ ሴሎች ---------- */
/* ክንውን እና ወጪ (ብር) — አንድ ወጥ ቅርጽ (uniform editable cells) */
table.data td.mq-act.mq-current,
table.data td.cell-spent { font-weight: 700; color: #0a4a35; }
.inline-cell { cursor: text; position: relative; border-radius: 4px; transition: background .12s; }
.inline-cell:hover { background: #f3faf6; box-shadow: inset 0 0 0 1px #bcddcb; }
.inline-cell:focus {
  background: #fffdf0; box-shadow: inset 0 0 0 2px #0a4a35;
  outline: none; cursor: text;
}
.inline-cell.inline-value { font-weight: 700; color: #0a4a35; }
.inline-cell.inline-saving { opacity: .55; pointer-events: none; }
.band-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.band-note { margin-top: 2px; }
.band-toggle {
  width: 26px; height: 26px; line-height: 1; padding: 0;
  border-radius: 6px; cursor: pointer; font-size: .85rem; text-align: center;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.band-toggle .chevron { display: inline-block; transition: transform .25s ease; }
.band-toggle.collapsed .chevron { transform: rotate(-90deg); }
/* FA toggle: minus/plus icon */
.fa-toggle { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); color: #fff; }
.fa-toggle .icon-open, .fa-toggle .icon-closed { display: inline-block; line-height: 1; font-size: 1rem; font-weight: 700; }
.fa-toggle.collapsed .icon-open { display: none; }
.fa-toggle.collapsed .icon-closed { display: inline-block; }
.fa-toggle:not(.collapsed) .icon-closed { display: none; }
.fa-toggle:hover { background: rgba(255,255,255,.35); box-shadow: 0 0 8px rgba(255,255,255,.3); transform: scale(1.1); }
.fa-toggle:active { transform: scale(0.92); }
/* Goal toggle: filled triangle ▾ */
.goal-toggle { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color: #fff; }
.goal-toggle .chevron { font-size: .85rem; }
.goal-toggle:hover { background: rgba(255,255,255,.3); box-shadow: 0 0 6px rgba(255,255,255,.25); transform: scale(1.1); }
.goal-toggle:active { transform: scale(0.92); }
/* Objective toggle: open triangle ▿ */
.obj-toggle { background: rgba(13,110,79,.1); border: 1px solid rgba(13,110,79,.25); color: var(--primary-dark, #07573e); }
.obj-toggle .chevron { font-size: .85rem; }
.obj-toggle.collapsed .chevron { transform: rotate(-90deg); }
.obj-toggle:hover { background: rgba(13,110,79,.2); box-shadow: 0 0 6px rgba(13,110,79,.15); transform: scale(1.1); }
.obj-toggle:active { transform: scale(0.92); }
/* Activity toggle: small filled triangle */
.act-toggle { background: transparent; border: 1px solid rgba(0,0,0,.1); color: var(--primary, #0d6e4f); }
.act-toggle .chevron { font-size: .75rem; }
.act-toggle.collapsed .chevron { transform: rotate(-90deg); }
.act-toggle:hover { background: rgba(13,110,79,.1); border-color: rgba(13,110,79,.3); transform: scale(1.1); }
.act-toggle:active { transform: scale(0.92); }
/* Sec toggle: goal section level */
.sec-toggle { background: rgba(13,110,79,.06); border: 1px solid rgba(13,110,79,.15); color: var(--primary-dark, #07573e); }
.sec-toggle .chevron { font-size: .8rem; }
.sec-toggle.collapsed .chevron { transform: rotate(-90deg); }
.sec-toggle:hover { background: rgba(13,110,79,.12); transform: scale(1.1); }
.sec-toggle:active { transform: scale(0.92); }
/* Report detail: outcome-indicator toggle (የውጤት አመልካች sub-group) */
table.data .ind-toggle { background: rgba(13,110,79,.06); border: 1px solid rgba(13,110,79,.2); color: var(--primary-dark, #07573e); }
table.data .ind-toggle .chevron { font-size: .8rem; }
table.data .ind-toggle.collapsed .chevron { transform: rotate(-90deg); }
table.data .ind-toggle:hover { background: rgba(13,110,79,.12); transform: scale(1.1); }
table.data .ind-toggle:active { transform: scale(0.92); }
table.data .sub-count { font-size: .7rem; background: #e7f5ef; color: var(--primary-dark, #07573e); margin-left: 6px; }
/* Report detail expand/collapse toolbar */
.report-tree-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-tree-toolbar .btn { margin: 0; }
.report-tree-toolbar .tree-ico { opacity: .7; }
tr.fa-head[data-collapse], tr.goal-head[data-collapse], tr.sgoal-head[data-collapse] { cursor: pointer; }
table.data tr.fa-head[data-collapse]:hover td, table.data tr.goal-head[data-collapse]:hover td { filter: brightness(1.08); }
td.computed-weight { font-weight: 700; color: var(--primary-dark, #07573e); }
.act-child { color: var(--ink-soft, #666); }
.act-child-icon { color: var(--primary, #0d6e4f); margin-right: 4px; font-weight: 700; }
.act-child-row td { background: rgba(13,110,79,.03); }
.act-child-row .act-child-icon { font-size: .7rem; }

/* ---------- የትኩረት ጉዳይ inline edit (admin) ---------- */
.persp-row-form { margin: 0; }
.persp-row-form input[type="text"] { min-width: 200px; width: 60%; }
.persp-row-form input[type="number"] { width: 90px; }
.persp-row-form input {
  padding: 5px 8px; border: 1px solid var(--line, #dde3ea); border-radius: 6px;
}
.persp-cell { padding: 4px !important; }
.persp-actions { white-space: nowrap; }

/* ---------- Confirm dialog (styled modal) ---------- */
.confirm-backdrop { z-index: 90; align-items: center; padding: 24px 16px; }
.modal-backdrop.confirm-backdrop { justify-content: center; }
.confirm-modal {
  max-width: 430px; text-align: center; padding-top: 26px;
}
.confirm-modal .confirm-ico {
  width: 62px; height: 62px; line-height: 62px; margin: 0 auto 10px;
  border-radius: 50%; font-size: 1.7rem; text-align: center;
  background: #eef4ff; color: #2b5fb8;
}
.confirm-modal h3 { margin: 0 0 8px; font-size: 1.05rem; }
.confirm-modal p {
  margin: 0; padding: 0 26px; color: var(--ink, #233); font-size: .93rem;
  line-height: 1.55; white-space: pre-line;
}
.confirm-modal .confirm-foot {
  border-top: none; justify-content: center; margin-top: 18px; padding-bottom: 20px;
}
.confirm-modal.danger .confirm-ico { background: #fdeaea; color: var(--danger, #c0392b); animation: confirmPulse .9s ease infinite alternate; }
@keyframes confirmPulse { from { transform: scale(1); } to { transform: scale(1.06); } }
.prompt-modal .prompt-input {
  width: calc(100% - 52px); margin: 10px auto 0; display: block;
  padding: 9px 12px; border: 1px solid var(--line, #dde3ea); border-radius: 8px;
  font: inherit; resize: vertical;
}
.prompt-modal .prompt-input:focus { outline: none; border-color: var(--primary, #0b6e4f); }
.prompt-modal .prompt-err { border-color: var(--danger, #c0392b); background: #fff5f5; }

/* ---------- Toast flash messages (top-right, below topbar) ---------- */
.toast-stack {
  position: fixed; top: 64px; right: 16px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast-stack .alert {
  pointer-events: auto; margin: 0; padding: 10px 12px 10px 14px;
  font-size: .84rem; line-height: 1.45; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(8,24,18,.16);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  animation: toastIn .22s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.alert-close {
  flex: none; background: none; border: none; cursor: pointer;
  color: inherit; opacity: .55; font-size: .8rem; line-height: 1;
  padding: 2px 4px; border-radius: 6px;
}
.alert-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
@media (max-width: 640px) {
  .toast-stack { top: auto; bottom: 14px; right: 12px; left: 12px; width: auto; }
}

/* ═══════ Inline Document Editor ═══════ */
.doc-editing [data-edit] {
  outline: 1.5px dashed #0B6E4F;
  outline-offset: 2px;
  border-radius: 4px;
  cursor: text;
  transition: background .12s;
}
.doc-editing [data-edit]:hover { background: #f3fbf7; }
.doc-editing [data-edit].ce-on {
  background: #fffef5;
  padding: 2px 4px;
}
.ie-host { margin: 6px 0; }
.doc-editing .ie-host .ql-toolbar { border-radius: 8px 8px 0 0; border-color: #0B6E4F; background: #f8f9fa; }
.doc-editing .ie-host .ql-container { border-radius: 0 0 8px 8px; border-color: #0B6E4F; background: #fff; min-height: 60px; }
.btn-edit-doc[aria-pressed='true'] { background: #0B6E4F; color: #fff; }

/* Header / Footer inline editor panel */
.hf-panel { border: 1px solid #e3e6ea; border-radius: 10px; padding: 12px 14px; margin: 10px 0 18px; background: #fafbfc; }
.hf-panel .hf-row { display: flex; gap: 18px; flex-wrap: wrap; }
.hf-panel .hf-row > div { flex: 1 1 320px; min-width: 260px; }
.hf-panel label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; }
.hf-panel .ie-rich { border: 1px solid #dadce0; border-radius: 6px; padding: 6px 8px; background: #fff; min-height: 38px; }
.ie-rich { font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif; }

/* ---- Goal pagination on plan detail ---- */
.pager {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  padding: 16px; flex-wrap: wrap;
}
.pager-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px; text-decoration: none;
  background: var(--primary); color: #fff; font-weight: 600; font-size: .85rem;
  transition: background .15s ease;
}
.pager-btn:hover { background: var(--primary-dark); text-decoration: none; }
.pager-info { color: var(--muted); font-size: .82rem; }
/* ቁጥር ያዙሉ የገጽ አገልግሎቶች — ከየፊተኛ/ቀጣይ አዝራሮች ለመታየት ቀላል */
.pager-num {
  min-width: 34px; justify-content: center; padding: 7px 10px;
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary);
}
.pager-num:hover { background: var(--primary); color: #fff; }
.pager-num.active { background: var(--primary); color: #fff; font-weight: 700; }
.pager-num.active:hover { background: var(--primary-dark); color: #fff; }
.pager-ell { color: var(--muted); font-size: .85rem; padding: 0 2px; }
/* የፔጅ መጠን ምርጫ */
.pager-size {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: .82rem;
}
.pager-size select {
  padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--border, #d5d9dd);
  background: #fff; color: var(--text); font-size: .82rem;
  cursor: pointer;
}
.pager-size select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* የዝርዝር ገጾች የፍለጋ አሞሌ */
[data-list-search] { margin-bottom: 12px; }
[data-list-search] .tt-count { margin-inline-start: auto; }

/* ===================================================================
   የኢትዮጵያ ቀን መራሪ (Ethiopian date picker)
   =================================================================== */
.ec-wrap { position: relative; display: inline-block; }
.ec-wrap .ec-hidden-input { display: none !important; }

.ec-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--border, #d5d9de); border-radius: 8px;
  background: #fff; color: var(--text, #222);
  font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif;
  font-size: .88rem; line-height: 1.3; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ec-btn:hover { border-color: var(--primary, #0B6E4F); }
.ec-btn:focus-visible { outline: 2px solid var(--primary, #0B6E4F); outline-offset: 1px; }
.ec-btn.ec-has-value { color: var(--text, #222); font-weight: 600; }
.ec-btn:not(.ec-has-value) .ec-text { color: var(--muted, #6b7280); font-weight: 400; }
.ec-btn::after { content: "\1F4C5"; font-size: .7rem; opacity: .55; }

.ec-pop {
  display: none; position: absolute; z-index: 1080; top: calc(100% + 6px); left: 0;
  width: 292px; padding: 10px;
  background: #fff; border: 1px solid var(--border, #d5d9de); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
  font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif;
}
.ec-pop.open { display: block; }

.ec-head { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.ec-head .ec-nav {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border, #d5d9de); background: #fff;
  color: var(--text, #222); font-size: 1rem; line-height: 1; cursor: pointer;
}
.ec-head .ec-nav:hover { background: #f2f6f4; border-color: var(--primary, #0B6E4F); }
.ec-head .ec-m, .ec-head .ec-y {
  flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 4px;
  border: 1px solid var(--border, #d5d9de); border-radius: 6px;
  background: #fff; color: var(--text, #222); font-size: .82rem;
  font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif;
}

.ec-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ec-grid.wk { margin-bottom: 3px; }
.ec-grid.wk span {
  text-align: center; font-size: .68rem; color: var(--muted, #6b7280);
  font-weight: 700; padding: 3px 0;
}
.ec-grid .ec-pad { display: block; }

.ec-d {
  height: 32px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text, #222); font-size: .84rem; cursor: pointer;
  font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif;
}
.ec-d:hover { background: #eef4f1; }
.ec-d.ec-today { box-shadow: inset 0 0 0 1px var(--primary, #0B6E4F); font-weight: 700; }
.ec-d.ec-sel { background: var(--primary, #0B6E4F); color: #fff; font-weight: 700; }

.ec-foot { display: flex; gap: 12px; margin-top: 8px; padding-top: 7px; border-top: 1px solid #eceef0; }
.ec-link {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  color: var(--primary, #0B6E4F); font-size: .78rem; font-weight: 600;
  font-family: 'Nyala', 'Noto Sans Ethiopic', sans-serif;
}
.ec-link:hover { text-decoration: underline; }
