/* Damotech-inspired look per Christiaan's PBI Slide 1 direction (Read First 2,
   items 10-14): NP-orange page background, black top bar, NP-grey sidebar.
   NP orange = #F47321, the brand orange from "Nolwazi Projects Colours"
   (Logos folder) - switched from #F7800D on Christiaan's instruction,
   2026-08-20. The RAG Amber stays #F7800D everywhere (fixed company-wide
   status colour, separate from brand identity).
   NP grey = #404041, the real brand grey from "Nolwazi Projects Colours"
   (Logos folder, 2026-08-20) - replaces the old #58595B assumption.
   Font: Verdana per company formatting standards. */

:root {
  --np-orange: #F47321;
  --np-orange-deep: #D75F13;
  --np-black: #111111;
  --np-grey: #404041;
  --np-grey-dark: #333334;
  --np-red: #FF0000;
  --np-green: #92D050;
}

body { font-family: Verdana, Geneva, sans-serif; }

/* The hidden attribute must ALWAYS win, even against display:flex rules —
   without this, "hidden" elements (like the client view's top tab bar)
   keep displaying. */
[hidden] { display: none !important; }

#appShell {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--np-orange) 0%, var(--np-orange) 55%, var(--np-orange-deep) 55%, var(--np-orange-deep) 100%);
  display: flex; flex-direction: column;
}

/* ---- Top bar (black) ---- */
.np-topbar {
  background: var(--np-black); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px; gap: 16px;
}
.np-logo-slot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-logo-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--np-orange);
  color: #fff; font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; flex: 0 0 auto;
  border: 1px dashed rgba(255,255,255,.35); /* dashed = reserved logo slot */
}
.np-logo-text { display: flex; flex-direction: column; min-width: 0; }
.np-logo-text strong { font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.np-logo-sub { font-size: 11px; color: #c9c5bc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-topbar-right { display: flex; align-items: center; gap: 10px; }
.np-pill {
  background: rgba(255,255,255,.12); color: #fff; font-size: 11.5px;
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.np-logout { color: #fff; border: 1px solid rgba(255,255,255,.35); }
.np-logout:hover { background: rgba(255,255,255,.12); }

/* ---- Body: sidebar + main ---- */
.np-body { display: flex; flex: 1; min-height: 0; }

.np-sidebar {
  width: 230px; flex: 0 0 230px; background: var(--np-grey); color: #fff;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 12px;
}
.np-side-head { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.np-site-header { padding-bottom: 4px; }
.np-site-current { color: var(--np-orange); font-weight: 700; font-size: 15px; }
.np-side-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #c9c5bc; margin-top: 8px; }
.np-nav-menu { display: flex; flex-direction: column; gap: 1px; }
.np-nav-btn {
  background: none; border: none; color: #e8e6e1; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 6px; font-size: 12.5px; font-family: inherit;
}
.np-nav-btn:hover { background: rgba(255,255,255,.10); }
.np-nav-btn.active { background: #fff; color: var(--np-orange); font-weight: 700; }
.np-clientview { color: #fff; background: var(--np-orange); border: none; font-weight: 700; }
.np-clientview:hover { background: var(--np-orange-deep); }

/* ---- Layout view ---- */
.np-layout-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
@media (max-width: 1000px) { .np-layout-wrap { grid-template-columns: 1fr; } }
.np-layout-opts { border: 1px solid var(--line, #e3e0da); border-radius: 8px; padding: 12px; font-size: 12.5px; align-self: start; }
.np-layout-opts h3 { font-size: 12px; margin: 12px 0 6px; color: var(--np-orange); }
.np-layout-opts h3:first-child { margin-top: 0; }
.np-layout-opts select, .np-layout-opts input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line, #e3e0da);
  border-radius: 6px; font-size: 12px; font-family: inherit; margin-bottom: 6px;
}
.np-mode-toggle { display: flex; gap: 0; border: 1px solid var(--line, #e3e0da); border-radius: 20px; overflow: hidden; }
.np-mode-toggle button { flex: 1; border: none; background: #fff; padding: 6px 4px; font-size: 11.5px; cursor: pointer; font-family: inherit; }
.np-mode-toggle button.active { background: var(--np-orange); color: #fff; font-weight: 700; }
.np-plan-scroll { border: 1px solid var(--line, #e3e0da); border-radius: 8px; background: #fff; overflow-y: auto; overflow-x: hidden; max-height: 74vh; position: relative; }
.np-plan-scroll svg { display: block; }
.np-loc-dot { cursor: pointer; }
.np-detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 92vw;
  background: #fff; box-shadow: -12px 0 34px rgba(0,0,0,.25); z-index: 60;
  padding: 18px; overflow-y: auto;
}
.np-detail-panel h2 { margin-top: 0; }
.np-detail-close { float: right; }
.np-finding-card { border: 1px solid var(--line, #e3e0da); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; }
.np-photo-slot {
  background: var(--bg, #f4f2ee); border: 1px dashed #c9c5bc; border-radius: 6px;
  height: 110px; display: flex; align-items: center; justify-content: center;
  color: #8a8880; font-size: 11.5px; margin: 8px 0; cursor: pointer;
}
.np-photo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.np-photo-thumb {
  width: 92px; height: 92px; border-radius: 6px; overflow: hidden; position: relative;
  border: 1px solid var(--line, #e3e0da); cursor: pointer; background: #f4f2ee;
}
.np-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-photo-thumb .np-photo-tag {
  position: absolute; bottom: 3px; left: 3px; background: #92D050; color: #000;
  font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 8px;
}
.np-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 80;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.np-lightbox > div { background: #fff; padding: 14px; border-radius: 8px; max-width: 80vw; max-height: 85vh; overflow: auto; }
.np-side-filter {
  background: var(--np-grey-dark); border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px; color: #fff; padding: 7px 10px; font-size: 12px; width: 100%;
  font-family: inherit;
}
.np-side-filter::placeholder { color: #c9c5bc; }
.np-side-company { color: var(--np-orange); font-weight: 700; font-size: 13px; margin-top: 4px; }
.np-site-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.np-site-btn {
  background: none; border: none; color: #e8e6e1; text-align: left; cursor: pointer;
  padding: 7px 10px; border-radius: 6px; font-size: 12.5px; font-family: inherit;
  display: flex; align-items: center; gap: 8px;
}
.np-site-btn:hover { background: rgba(255,255,255,.10); }
.np-site-btn.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
.np-site-btn .np-site-ico { opacity: .7; font-size: 11px; }
.np-side-drop { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.np-side-drop label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #c9c5bc; }
.np-side-drop select {
  background: var(--np-grey-dark); color: #fff; border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px; padding: 7px 8px; font-size: 12px; width: 100%; font-family: inherit;
}

/* ---- Main content on the orange background ---- */
.np-main { flex: 1; padding: 18px 22px 26px; min-width: 0; }
.np-content {
  background: #fff; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.18);
  padding: 0 18px 12px; min-height: 100%;
}
.np-content .tabs { margin: 0 -18px 14px; padding: 0 18px; border-radius: 12px 12px 0 0; }

/* ---- Stat cards with orange icon squares (Slide 1 style) ---- */
.np-cards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 6px 0 18px; }
.np-card {
  display: flex; align-items: stretch; border: 1px solid var(--line, #e3e0da);
  border-radius: 8px; overflow: hidden; min-width: 210px; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.np-card-ico {
  width: 54px; background: var(--np-orange); color: #fff; display: flex;
  align-items: center; justify-content: center; font-size: 20px;
}
.np-card-body { padding: 10px 16px; display: flex; flex-direction: column; justify-content: center; }
.np-card-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.np-card-label { font-size: 11px; color: var(--ink-soft, #6f6d66); }

/* ---- Pie row ---- */
.np-pie-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.np-pie-box { text-align: center; }
.np-pie-box h3 { font-size: 12.5px; margin: 0 0 6px; }
.np-pie-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-top: 8px; }

/* ---- Status block (Slide 2 style) ---- */
.np-status-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .np-status-wrap { grid-template-columns: 1fr; } }
.np-status-block { border: 2px solid var(--np-grey); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.np-status-block .np-status-title { background: #FBE5D0; font-weight: 800; font-size: 18px; letter-spacing: .06em; text-align: center; padding: 8px; }
.np-status-block .np-status-cell { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; padding: 14px; border-top: 1px solid var(--np-grey); }
