@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Ethiopic:wght@300;400;500;600;700&family=Noto+Serif+Ethiopic:wght@400;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  /* Corporate palette — brand is the light blue #4ABED5. The vivid brand
     blue is used as the ACCENT (--green-lt: active states, highlights); the
     primary token (--green) is a readable deep shade of the same hue so
     white-on-fill and text-on-white both stay legible. Token still named
     --green for compatibility with existing rules. */
  --green:       #1a7d90;  /* readable brand blue — headers, buttons, heading text (4.8:1) */
  --green-lt:    #4ABED5;  /* vivid brand light blue — active states, accents, hovers */
  --green-dk:    #15606f;  /* deep brand blue — sidebar, depth */
  --gold:        #c8a227;
  --gold-lt:     #f0c849;
  --red:         #c0392b;
  --blue:        #4DB049;  /* corporate brand green (secondary accent) */
  --orange:      #ca6f1e;
  --teal:        #148f77;
  --success:     #1e8449;
  --warning:     #b7770d;
  --danger:      #c0392b;
  --info:        #1a5276;
  --bg:          #eef0f5;
  --surface:     #ffffff;
  --surface2:    #f7f8fa;
  --border:      #d5dbe8;
  --text:        #1a2332;
  --muted:       #64748b;
  --sidebar-w:   265px;
  --topbar-h:    58px;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 2px 10px rgba(0,0,0,.07);
  --shadow-md:   0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.15);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*{box-sizing:border-box;margin:0;padding:0;}
html{font-size:14px;scroll-behavior:smooth;}
body{
  font-family:'Ebrima','Noto Sans Ethiopic','Nyala',system-ui,sans-serif;
  background:var(--bg);color:var(--text);line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--green-lt);text-decoration:none;}

/* ============================================================
   LAYOUT
   ============================================================ */
#app{display:flex;min-height:100vh;}

/* ── SIDEBAR ── */
.sidebar{
  width:var(--sidebar-w);background:linear-gradient(165deg,var(--green) 0%,var(--green-dk) 100%);color:#fff;
  display:flex;flex-direction:column;
  position:fixed;inset:0 auto 0 0;z-index:300;
  overflow-y:auto;transition:transform .28s ease;
}
.sidebar-logo{
  padding:22px 16px 16px;border-bottom:1px solid rgba(255,255,255,.1);
  text-align:center;
}
.sidebar-logo .emb{
  width:58px;height:58px;border-radius:50%;margin:0 auto 10px;
  background:linear-gradient(135deg,var(--gold),var(--gold-lt));
  display:flex;align-items:center;justify-content:center;font-size:26px;
}
.sidebar-logo .org-am{
  font-family:'Noto Serif Ethiopic',serif;font-size:11.5px;
  color:rgba(255,255,255,.92);line-height:1.55;
}
.sidebar-logo .org-en{font-size:9.5px;color:var(--gold-lt);margin-top:3px;display:block;}

.sidebar-nav{flex:1;padding:8px 0;}
.nav-section{
  padding:14px 18px 4px;font-size:9.5px;text-transform:uppercase;
  letter-spacing:1.2px;color:rgba(255,255,255,.3);
}
.nav-item{
  display:flex;align-items:center;gap:11px;padding:10px 20px;
  cursor:pointer;color:rgba(255,255,255,.72);font-size:13px;
  border-left:3px solid transparent;transition:all .16s;
  user-select:none;
}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff;}
.nav-item.active{
  background:rgba(200,162,39,.2);color:var(--gold-lt);
  border-left-color:var(--gold);font-weight:600;
}
.nav-item .ico{font-size:16px;width:22px;text-align:center;flex-shrink:0;}

.sidebar-foot{
  padding:12px 16px;border-top:1px solid rgba(255,255,255,.1);
  display:flex;align-items:center;gap:10px;
}
.avatar{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  background:var(--gold);color:var(--green-dk);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:15px;
}
.foot-info{flex:1;min-width:0;}
.foot-name{font-size:12px;font-weight:600;color:#fff;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.foot-role{font-size:10px;color:rgba(255,255,255,.4);}
.logout{cursor:pointer;color:rgba(255,255,255,.4);font-size:19px;
  transition:color .15s;border:none;background:none;}
.logout:hover{color:var(--red);}

/* ── MAIN ── */
.main{margin-left:var(--sidebar-w);flex:1;min-height:100vh;
      display:flex;flex-direction:column;transition:margin-left .15s ease;}

/* ── TOPBAR ── */
.topbar{
  height:var(--topbar-h);background:var(--surface);
  border-bottom:1px solid var(--border);
  padding:0 24px;position:sticky;top:0;z-index:200;
  display:flex;align-items:center;justify-content:space-between;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.topbar-title{font-size:16px;font-weight:700;color:var(--green);}
.topbar-actions{display:flex;gap:8px;align-items:center;}

/* ── PAGE ── */
.page{padding:22px 24px;flex:1;}

/* ============================================================
   CARDS
   ============================================================ */
.card{
  background:var(--surface);border-radius:var(--radius);
  border:1px solid var(--border);box-shadow:var(--shadow);overflow:hidden;
}
.card+.card{margin-top:16px;}
.card-head{
  padding:13px 20px;border-bottom:1px solid var(--border);
  background:var(--surface2);display:flex;align-items:center;
  justify-content:space-between;gap:10px;
}
.card-head h3{font-size:13.5px;font-weight:700;color:var(--green);white-space:nowrap;}
.card-body{padding:20px;}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));
  gap:14px;margin-bottom:20px;}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:18px 20px;display:flex;align-items:center;gap:14px;box-shadow:var(--shadow);}
.stat-ico{width:50px;height:50px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0;}
.ic-g{background:rgba(30,132,73,.1);color:var(--success);}
.ic-b{background:rgba(36,113,163,.1);color:var(--blue);}
.ic-o{background:rgba(202,111,30,.1);color:var(--orange);}
.ic-t{background:rgba(20,143,119,.1);color:var(--teal);}
.stat-num{font-size:30px;font-weight:700;color:var(--green);line-height:1;}
.stat-lbl{font-size:11.5px;color:var(--muted);margin-top:3px;}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 18px;border-radius:var(--radius-sm);border:none;
  font-family:inherit;font-size:13px;font-weight:500;
  cursor:pointer;transition:all .15s;white-space:nowrap;
  line-height:1.3;
}
.btn:disabled{opacity:.5;cursor:not-allowed;}
.btn-primary  {background:var(--green);color:#fff;}
.btn-primary:hover{background:var(--green-dk);filter:brightness(1.15);}
.btn-gold     {background:var(--gold);color:var(--green-dk);}
.btn-gold:hover{background:var(--gold-lt);}
.btn-success  {background:#1e8449;color:#fff;}
.btn-success:hover{background:#17703d;}
.btn-danger   {background:var(--danger);color:#fff;}
.btn-danger:hover{background:#a93226;}
.btn-warning  {background:var(--orange);color:#fff;}
.btn-warning:hover{background:#a04000;}
.btn-info     {background:var(--blue);color:#fff;}
.btn-info:hover{background:#1a5276;}
.btn-outline  {background:transparent;border:1px solid var(--border);color:var(--text);}
.btn-outline:hover{border-color:var(--green);color:var(--green);}
.btn-sm{padding:5px 12px;font-size:12px;}
.btn-xs{padding:3px 8px;font-size:11px;}

/* ============================================================
   TABLE
   ============================================================ */
.tbl-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:13px;}
th{
  background:var(--green);color:#fff;padding:9px 12px;
  text-align:left;font-weight:500;font-size:12px;white-space:nowrap;
}
td{padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:rgba(26,79,42,.025);}
.tc{text-align:center;}.tr{text-align:right;}

/* Plan table quarter headers */
.th-q1{background:#1a7d90 !important;color:#fff !important;}
.th-q2{background:#e6b830 !important;color:#3a2800 !important;}
.th-q3{background:#167486 !important;color:#fff !important;}
.th-q4{background:#15606f !important;color:#fff !important;}
.th-bud{background:#2c5282 !important;color:#fff !important;}
.section-row td{
  background:rgba(26,79,42,.07) !important;
  font-weight:700;color:var(--green);font-size:12px;
}
/* Wide plan matrix: shrink to fit the screen width (compact, like the source
   spreadsheet) — small font, tight padding, wrapping headers and text so all
   columns fit without horizontal scrolling on a normal screen. */
.plan-tbl-wrap{overflow-x:auto;font-size:12px;}
.plan-tbl-wrap table{width:100%;min-width:1150px;table-layout:fixed;}
.plan-tbl-wrap th,.plan-tbl-wrap td{padding:5px 6px;white-space:normal;word-break:break-word;
  overflow-wrap:anywhere;border:1px solid var(--border);}
.plan-tbl-wrap thead th{border-color:rgba(255,255,255,.28);}

/* Collapsed icon-rail sidebar — auto-enabled on the wide plan view (#app gets
   .nav-collapsed) to free ~200px of width. Hover the rail to peek the full
   menu; since the sidebar is position:fixed it overlays content (no reflow). */
#app.nav-collapsed .sidebar{transition:width .15s ease;}
#app.nav-collapsed .sidebar:not(:hover){width:58px;}
#app.nav-collapsed .main{margin-left:58px;}
#app.nav-collapsed .sidebar:not(:hover) .org-am,
#app.nav-collapsed .sidebar:not(:hover) .org-en,
#app.nav-collapsed .sidebar:not(:hover) .nav-section,
#app.nav-collapsed .sidebar:not(:hover) .nav-item span:not(.ico),
#app.nav-collapsed .sidebar:not(:hover) .foot-info,
#app.nav-collapsed .sidebar:not(:hover) .logout{display:none;}
#app.nav-collapsed .sidebar:not(:hover) .nav-item{justify-content:center;padding-left:0;padding-right:0;}
#app.nav-collapsed .sidebar:not(:hover) .sidebar-foot{justify-content:center;}
#app.nav-collapsed .sidebar:not(:hover) .sidebar-logo img{width:38px !important;height:38px !important;}
#app.nav-collapsed .sidebar:hover{box-shadow:3px 0 18px rgba(0,0,0,.28);}

/* ============================================================
   FORMS
   ============================================================ */
.form-group{margin-bottom:14px;}
.lbl{
  display:block;font-size:11px;font-weight:700;color:var(--muted);
  margin-bottom:5px;text-transform:uppercase;letter-spacing:.4px;
}
.inp{
  width:100%;padding:9px 12px;
  border:1px solid var(--border);border-radius:var(--radius-sm);
  font-family:inherit;font-size:13px;color:var(--text);background:var(--surface);
  transition:border-color .15s,box-shadow .15s;
}
.inp:focus{outline:none;border-color:var(--green-lt);
  box-shadow:0 0 0 3px rgba(26,79,42,.09);}
.inp[readonly]{background:var(--surface2);cursor:default;}
select.inp{cursor:pointer;}
textarea.inp{resize:vertical;min-height:70px;}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}
.row4{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:12px;}
.rowAuto{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;}

/* ============================================================
   BADGES
   ============================================================ */
.badge{
  display:inline-flex;align-items:center;
  padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;
  white-space:nowrap;
}
.bd-draft    {background:#f0f2f5;color:#64748b;}
.bd-submitted{background:rgba(36,113,163,.12);color:#1a5276;}
.bd-approved {background:rgba(30,132,73,.12);color:#1e5631;}
.bd-active   {background:rgba(30,132,73,.12);color:#1e5631;}
.bd-closed   {background:#f0f2f5;color:#888;}
.bd-admin    {background:rgba(192,57,43,.1);color:#922b21;}
.bd-sg       {background:rgba(36,113,163,.12);color:#1a5276;}
.bd-planning {background:rgba(200,162,39,.15);color:#7d6608;}

/* ============================================================
   MODAL
   ============================================================ */
.overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.52);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;padding:16px;
  animation:fadeIn .15s ease;
}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
.modal{
  background:var(--surface);border-radius:var(--radius);
  width:100%;max-width:680px;max-height:93vh;
  display:flex;flex-direction:column;
  box-shadow:var(--shadow-lg);
  animation:slideUp .2s ease;
}
@keyframes slideUp{from{transform:translateY(16px);opacity:.6;}to{transform:none;opacity:1;}}
.modal-xl{max-width:1080px;}
.modal-head{
  padding:15px 20px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;background:var(--surface2);border-radius:var(--radius) var(--radius) 0 0;
}
.modal-head h3{font-size:15px;font-weight:700;color:var(--green);}
.modal-body{padding:20px;overflow-y:auto;flex:1;}
.modal-foot{
  padding:13px 20px;border-top:1px solid var(--border);
  display:flex;gap:8px;justify-content:flex-end;flex-shrink:0;
}
.x-btn{cursor:pointer;font-size:22px;color:var(--muted);border:none;
  background:none;line-height:1;transition:color .12s;}
.x-btn:hover{color:var(--danger);}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page{
  min-height:100vh;
  background:linear-gradient(140deg,var(--green-dk) 0%,var(--green) 55%,var(--green-lt) 100%);
  display:flex;align-items:center;justify-content:center;padding:20px;
}
.login-card{
  background:#fff;border-radius:18px;padding:44px 42px 36px;
  width:100%;max-width:440px;box-shadow:0 20px 60px rgba(0,0,0,.18);
}
.login-logo{text-align:center;margin-bottom:28px;}
.login-logo h1{
  font-family:'Noto Serif Ethiopic',serif;font-size:15px;
  color:var(--green-dk);line-height:1.6;margin:0 0 4px;
}
.login-logo p{font-size:11px;color:var(--muted);margin:2px 0 0;}
.login-foot{text-align:center;margin-top:18px;font-size:10.5px;color:var(--muted);
  padding-top:16px;border-top:1px solid var(--border);}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.pbar{background:var(--border);border-radius:4px;height:8px;overflow:hidden;}
.pfill{height:100%;border-radius:4px;transition:width .4s ease;}
.pf-g{background:var(--success);}
.pf-o{background:var(--orange);}
.pf-r{background:var(--danger);}

/* ============================================================
   ALERTS & TOAST
   ============================================================ */
.alert{
  padding:11px 15px;border-radius:var(--radius-sm);
  font-size:13px;margin-bottom:14px;
  display:flex;align-items:center;gap:8px;
}
.al-ok  {background:rgba(30,132,73,.09);color:#1e5631;border:1px solid rgba(30,132,73,.2);}
.al-err {background:rgba(192,57,43,.09);color:#922b21;border:1px solid rgba(192,57,43,.2);}
.al-warn{background:rgba(202,111,30,.09);color:#7e5109;border:1px solid rgba(202,111,30,.2);}
.al-info{background:rgba(36,113,163,.09);color:#1a5276;border:1px solid rgba(36,113,163,.2);}

#toasts{position:fixed;bottom:22px;right:22px;z-index:9999;
  display:flex;flex-direction:column;gap:8px;pointer-events:none;}
.toast{
  background:var(--green-dk);color:#fff;
  padding:11px 18px;border-radius:var(--radius-sm);font-size:13px;
  box-shadow:var(--shadow-lg);display:flex;align-items:center;
  gap:10px;min-width:250px;pointer-events:auto;
  animation:tIn .22s ease;
}
.toast.ok   {background:#1a5c31;}
.toast.err  {background:#922b21;}
.toast.warn {background:#7e5109;}
.toast.info {background:#1a5276;}
@keyframes tIn{from{transform:translateX(60px);opacity:0;}to{transform:none;opacity:1;}}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar{
  display:flex;gap:12px;align-items:center;flex-wrap:wrap;
  padding:13px 18px;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius);
  margin-bottom:14px;
}
.filter-bar label{font-size:12px;font-weight:700;color:var(--muted);}
.filter-bar select,.filter-bar input{
  padding:6px 10px;border:1px solid var(--border);
  border-radius:var(--radius-sm);font-family:inherit;font-size:13px;
}

/* ============================================================
   AMHARIC LETTERHEAD
   ============================================================ */
.am-head{text-align:center;margin-bottom:18px;font-family:'Noto Serif Ethiopic',serif;}
.am-head h1{font-size:16px;color:var(--green-dk);line-height:1.5;}
.am-head h2{font-size:12px;color:var(--muted);margin-top:3px;}

/* ============================================================
   MISC
   ============================================================ */
.spinner{
  display:inline-block;width:24px;height:24px;
  border:2px solid var(--border);border-top-color:var(--green);
  border-radius:50%;animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}
.loading-cover{
  position:fixed;inset:0;background:rgba(255,255,255,.65);
  display:flex;align-items:center;justify-content:center;z-index:9990;
}
.empty-state{text-align:center;padding:60px 20px;color:var(--muted);}
.empty-state .ei{font-size:48px;margin-bottom:10px;}
.m-input{
  width:58px;padding:3px 4px;border:1px solid var(--border);
  border-radius:4px;font-family:inherit;font-size:11px;text-align:center;
}
.m-input:focus{outline:none;border-color:var(--green-lt);}
hr.sep{border:none;border-top:1px solid var(--border);margin:16px 0;}

/* ============================================================
   PRINT
   ============================================================ */
@media print{
  .sidebar,.topbar,.no-print,.overlay,.modal-overlay{display:none !important;}
  .main{margin-left:0 !important;}
  body{font-size:11px;}
  th{background:var(--green) !important;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .section-row td{background:rgba(0,0,0,.06) !important;
    -webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:900px){
  :root{--sidebar-w:260px;}
  .sidebar{transform:translateX(-260px);}
  .sidebar.open{transform:translateX(0);}
  .main{margin-left:0;}
  .stats-row{grid-template-columns:1fr 1fr;}
  .row4{grid-template-columns:1fr 1fr;}
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
#notif-bell { transition: transform .15s; }
#notif-bell:hover { transform: rotate(15deg) scale(1.1); }

.bd-rejected { background:rgba(192,57,43,.1);color:#922b21; }

/* Financial table totals row */
tfoot tr td { font-weight: 700; }

/* Quarter badge colors */
.q1-badge { background: rgba(30,132,73,.1);  color: #1e5631; }
.q2-badge { background: rgba(200,162,39,.1); color: #7d6608; }
.q3-badge { background: rgba(36,113,163,.1); color: #1a5276; }
.q4-badge { background: rgba(142,68,173,.1); color: #6c3483; }

/* ============================================================
   PLAN SECTION HEADER ROWS
   ============================================================ */
/* Strategic focus row */
.sf-row td  { background: rgba(26,125,144,.13) !important;
              border-left: 4px solid var(--green);
              font-weight: 700; color: var(--green-dk); font-size: 12px; }
/* Goal row */
.goal-row td { background: rgba(200,162,39,.10) !important;
               border-left: 4px solid #c8a227;
               font-weight: 700; color: #5a3e00; font-size: 12px; }
/* Objective row */
.obj-row td  { background: rgba(41,128,185,.07) !important;
               border-left: 4px solid #2471a3;
               font-weight: 600; color: #1a5276; font-size: 11.5px; }

/* Section tip in modal */
.section-tip {
  background: rgba(26,79,42,.05);
  border: 1px solid rgba(26,79,42,.15);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 16px;
}

/* rejected badge */
.bd-rejected { background: rgba(192,57,43,.12); color: #922b21; border: 1px solid rgba(192,57,43,.2); }

/* Quarter badges */
.q1-badge { background:rgba(30,132,73,.12); color:#1e5631; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600; white-space:nowrap; }
.q2-badge { background:rgba(200,162,39,.15); color:#7d6608; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600; white-space:nowrap; }
.q3-badge { background:rgba(36,113,163,.12); color:#1a5276; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600; white-space:nowrap; }
.q4-badge { background:rgba(142,68,173,.12); color:#6c3483; padding:2px 8px; border-radius:12px; font-size:11px; font-weight:600; white-space:nowrap; }

/* ============================================================
   DASHBOARD CHARTS
   ============================================================ */
canvas { display: block; max-width: 100%; }
.dash-hidden { display: none !important; }
.tf-pbtn.active { background: var(--green) !important; color: #fff !important; border-color: var(--green) !important; }

@media (max-width: 900px) {
  /* Stack 2-col grids on mobile */
  div[style*="grid-template-columns:1fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 2.6fr"],
  div[style*="grid-template-columns:280px 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* 3/4-col stat grids -> 2 columns on mobile */
  div[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ============================================================
   COMBINED REPORT (ጥምር ሪፖርት) PRINT FORMAT
   ============================================================ */
.combined-report {
  font-family: 'Nyala', 'Ethiopic', Arial, sans-serif;
  font-size: 11px;
  color: #111;
  padding: 0 4px;
}
.rep-org-header {
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}
.rep-org-am {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.3;
}
.rep-org-en {
  font-size: 11px;
  color: #555;
  margin-top: 2px;
}
.rep-title-row {
  font-size: 13px;
  color: var(--green);
  margin-top: 6px;
}
/* Table */
.rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.rep-table th,
.rep-table td {
  border: 1px solid #999;
  padding: 3px 4px;
  vertical-align: top;
}
.rep-table .vt { vertical-align: top; }
.rep-hdr-1 th, .rep-hdr-2 th {
  background: #2e7d52;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  text-align: center;
  vertical-align: middle;
  line-height: 1.3;
}
/* Dept header rows */
.rep-dept-row .rep-dept-cell {
  background: #4a9e72;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
}
/* Data rows — light alternating */
.rep-data-row:nth-child(even) td { background: #f4fbf6; }
.rep-data-row td { line-height: 1.5; }
/* Extras table */
.extras-table th { text-align: center; }

/* Print */
@media print {
  .no-print, #sidebar, #topbar, .filter-bar,
  .card-head .btn, header { display: none !important; }
  #main-content, #page-content { margin: 0 !important; padding: 0 !important; }
  .combined-report { font-size: 8.5px; }
  .rep-table th, .rep-table td { padding: 2px 3px; font-size: 8.5px; }
  .rep-org-am { font-size: 13px; }
  .rep-org-en, .rep-title-row { font-size: 10px; }
  .rep-dept-row .rep-dept-cell { font-size: 10px; padding: 3px 6px; }
  @page { size: A4 landscape; margin: 6mm; }
}

/* ============================================================
   SIGNATURE BLOCK
   ============================================================ */
.rep-signature-block {
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid #ccc;
}
.rep-sig-box {
  text-align: center;
}
.rep-sig-line {
  border-bottom: 1px solid #333;
  height: 40px;
  margin-bottom: 6px;
}
.rep-sig-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
}
.rep-sig-title {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}
@media print {
  .rep-signature-block { margin-top: 20px; }
  .rep-sig-line { height: 30px; }
}

/* Closing line for combined report — strong bottom border on last table */
.combined-report > div:last-child table tbody tr:last-child td {
  border-bottom: 2px solid #2e7d52;
}
.combined-report .rep-close-line {
  height: 4px;
  background: linear-gradient(90deg, #2e7d52, #4a9e72, #2e7d52);
  border-radius: 2px;
  margin-top: 20px;
}
