/* =========================================================
   EGP / PNG NPC BRANDING
   Theme Scope Class: egp
   Apply in APEX page or app CSS Classes = egp
   ========================================================= */

html {
  background: transparent;
}

body.nea {
  --egp-npc-blue:        #1f5d8f;
  --egp-npc-blue-2:      #2a6ea5;
  --egp-npc-blue-3:      #3e82ba;
  --egp-npc-dark:        #1f2933;
  --egp-text:            #1f2933;
  --egp-muted:           #5b6b79;
  --egp-bg:              #f4f6f8;
  --egp-surface:         #ffffff;
  --egp-accent:          #f2c94c;   /* NPC yellow */
  --egp-accent-2:        #d4a514;   /* darker yellow */
  --egp-accent-soft:     rgba(242, 201, 76, 0.18);
  --egp-success:         #0f766e;
  --egp-danger:          #b42318;
  --egp-border:          rgba(31, 93, 143, 0.12);

  background: var(--egp-bg);
  color: var(--egp-text);
  position: relative;
}

body.nea .t-PageBody {
  background: transparent;
}

/* ---------------------------------------------------------
   Decorative top band only
   --------------------------------------------------------- */
body.nea::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("top-bg.jpg");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 120px;
  filter: grayscale(100%) contrast(108%);
}

/* IMPORTANT:
   Do NOT render bottom body decorative band.
   Footer itself will carry the bottom motif to avoid duplication.
*/
body.nea::after {
  display: none !important;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
body.nea .t-Header {
  border-bottom: 3px solid var(--egp-accent);
  background-image:
    linear-gradient(rgba(255,255,255,0.80), rgba(255,255,255,0.98)),
    url("top-bg.jpg");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
}

body.nea .t-Header-branding {
  background-image:
    linear-gradient(rgba(255,255,255,0.74), rgba(255,255,255,0.98)),
    url("top-bg.jpg");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
  border-bottom: 2px solid var(--egp-accent);
}

body.nea .t-Header-branding,
body.nea .t-Header-logo,
body.nea .t-Header-navBar,
body.nea .t-NavigationBar-item,
body.nea .t-NavigationBar-item .t-Button {
  color: var(--egp-text);
}

body.nea .t-NavigationBar-item.has-username .t-Button-label {
  text-transform: capitalize;
  color: var(--egp-npc-blue);
  font-weight: 700;
}

/* ---------------------------------------------------------
   Left navigation
   --------------------------------------------------------- */
body.nea .t-Body-nav {
  background: #4f4e47;
}

body.nea .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content,
body.nea .t-TreeNav .a-TreeView-row {
  color: #fff;
}

body.nea .t-TreeNav .is-current > .a-TreeView-content,
body.nea .t-TreeNav .a-TreeView-node--selected > .a-TreeView-content {
  background: rgba(255,255,255,0.10);
  border-left: 3px solid var(--egp-accent);
}

/* ---------------------------------------------------------
   Footer
   - only here, so no more duplicate image at bottom
   --------------------------------------------------------- */
body.nea .t-Footer {
  background-image:
    linear-gradient(rgba(255,255,255,0.96), rgba(255,255,255,0.86)),
    url("bottom-bg.jpg");
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 73px;
  border-top: 2px solid var(--egp-accent-soft);
  position: relative;
}

body.nea .t-Footer .t-Footer-body {
  padding-bottom: 14px;
}

/* ---------------------------------------------------------
   Hero Region
   - no red
   - no left border
   - no border radius
   --------------------------------------------------------- */
body.nea .t-HeroRegion,
body.nea .t-HeroRegion-wrap {
  border-radius: 0 !important;
}

body.nea .t-HeroRegion {
  background: linear-gradient(135deg, var(--egp-npc-blue) 0%, var(--egp-npc-blue-2) 100%);
  color: #fff;
  overflow: hidden;
  border-left: none !important;
  border: none !important;
  box-shadow: none;
}

body.nea .t-HeroRegion-title,
body.nea .t-HeroRegion-desc {
  color: #fff;
}

body.nea .t-HeroRegion-icon {
  background-color: var(--egp-accent);
  color: #fff;
  border-radius: 10px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
body.nea .t-Button--hot,
body.nea .t-Button--primary,
body.nea .a-Button--hot,
body.nea .a-Button--primary {
  background: linear-gradient(180deg, var(--egp-npc-blue-3) 0%, var(--egp-npc-blue) 100%) !important;
  border-color: var(--egp-npc-blue) !important;
  color: #fff !important;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.10);
}

body.nea .t-Button--hot:hover,
body.nea .t-Button--primary:hover,
body.nea .a-Button--hot:hover,
body.nea .a-Button--primary:hover {
  filter: brightness(1.05);
}

body.nea .t-Button--simple,
body.nea .t-Button--noUI,
body.nea .a-Button--noUI {
  color: var(--egp-npc-blue) !important;
}

/* Optional yellow emphasis button */
body.nea .nea-btn-accent.t-Button,
body.nea .nea-btn-accent.a-Button {
  background: linear-gradient(180deg, #f7d96d 0%, var(--egp-accent-2) 100%) !important;
  border-color: var(--egp-accent-2) !important;
  color: #222 !important;
}

/* ---------------------------------------------------------
   Focus rings
   --------------------------------------------------------- */
body.nea input:focus,
body.nea select:focus,
body.nea textarea:focus,
body.nea .t-Button:focus,
body.nea .a-Button:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.22) !important;
  border-color: var(--egp-accent) !important;
}

/* ---------------------------------------------------------
   Login logo cleanup
   --------------------------------------------------------- */
body.nea .t-Login-logo {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ---------------------------------------------------------
   Regions
   --------------------------------------------------------- */
body.nea .t-Region {
  border-radius: 10px;
  background: var(--egp-surface);
  border: 1px solid var(--egp-border);
}

body.nea .t-Region-header {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

body.nea .t-Region-title {
  color: var(--egp-npc-blue);
  font-weight: 700;
}

body.nea .box-shadow,
body.nea .nea-box-shadow {
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */
body.nea .t-CardsRegion .t-Card {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
  border: 1px solid rgba(31,93,143,0.08);
}

body.nea .t-Card-title {
  color: var(--egp-npc-blue);
  font-weight: 700;
}

body.nea .t-Card-desc,
body.nea .t-Card-subtitle {
  color: var(--egp-muted);
}

/* ---------------------------------------------------------
   Reports / IR / Grid
   --------------------------------------------------------- */
body.nea .a-IRR-table th,
body.nea .a-GV-header {
  background: #f7f9fb;
  color: var(--egp-npc-blue);
}

body.nea .a-IRR-table tr:hover td,
body.nea .a-GV-row:hover td {
  background: rgba(31,93,143,0.035);
}

/* ---------------------------------------------------------
   Badges / tabs
   --------------------------------------------------------- */
body.nea .t-Badge,
body.nea .a-Badge {
  border-radius: 999px;
}

body.nea .apex-rds-selected {
  --ut-tabs-item-highlight-color: var(--egp-accent);
}

/* ---------------------------------------------------------
   Utility helper classes
   --------------------------------------------------------- */
body.nea .nea-bg-npc,
body.nea .nea-bg-npc .t-Region-header {
  color: #fff;
  background: linear-gradient(180deg, var(--egp-npc-blue-3) 0%, var(--egp-npc-blue) 100%);
  font-weight: 700;
}

body.nea .nea-bg-accent,
body.nea .nea-bg-accent .t-Region-header {
  color: #222;
  background: linear-gradient(180deg, #f7d96d 0%, var(--egp-accent-2) 100%);
  font-weight: 700;
}

body.nea .nea-text-npc {
  color: var(--egp-npc-blue);
}

body.nea .nea-text-accent {
  color: var(--egp-accent-2);
}

body.nea .nea-status-approved {
  color: var(--egp-success);
  font-weight: 700;
}

body.nea .nea-status-rejected {
  color: var(--egp-danger);
  font-weight: 700;
}

body.nea .nea-status-pending {
  color: var(--egp-accent-2);
  font-weight: 700;
}

/* ---------------------------------------------------------
   Logo helper
   --------------------------------------------------------- */
.nea-ui-logo {
  min-height: 80px;
  margin-right: 10px;
}

.nea-ui-logo span {
  color: var(--egp-accent-2);
}

/* ---------------------------------------------------------
   Custom helper regions
   --------------------------------------------------------- */
body.nea .nea-hero-band {
  background: linear-gradient(135deg, var(--egp-npc-blue) 0%, var(--egp-npc-blue-2) 100%);
  color: #fff;
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  border-left: none;
}

body.nea .nea-highlight {
  border-left: 4px solid var(--egp-accent);
  padding-left: 1rem;
}

body.nea .nea-muted {
  color: var(--egp-muted);
}

/* =========================================================
   APEX 24 KPI CARDS - CORRECTED FOR a-CardView MARKUP
   Region CSS Class: egp-home-kpi
   ========================================================= */

body.nea .nea-home-kpi .a-CardView-items {
  gap: 1rem;
}

body.nea .nea-home-kpi .a-CardView-item {
  list-style: none;
}

/* main card */
body.nea .nea-home-kpi .a-CardView {
  position: relative;
  min-height: 190px;
  border: 0 !important;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(16, 36, 56, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

body.nea .nea-home-kpi .a-CardView:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px rgba(16, 36, 56, 0.22);
}

/* glossy overlay */
body.nea .nea-home-kpi .a-CardView::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.16) 0%,
    rgba(255,255,255,0.05) 38%,
    rgba(255,255,255,0.00) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* fixed background colors by position */
body.nea .nea-home-kpi .a-CardView-item:nth-child(1) .a-CardView {
  background: linear-gradient(135deg, #2c6f88 0%, #3d819b 100%);
}

body.nea .nea-home-kpi .a-CardView-item:nth-child(2) .a-CardView {
  background: linear-gradient(135deg, #e2a93b 0%, #efbc4f 100%);
}

body.nea .nea-home-kpi .a-CardView-item:nth-child(3) .a-CardView {
  background: linear-gradient(135deg, #cf4d63 0%, #db6278 100%);
}

body.nea .nea-home-kpi .a-CardView-item:nth-child(4) .a-CardView {
  background: linear-gradient(135deg, #2e8b72 0%, #46a58a 100%);
}

/* header/body layout */
body.nea .nea-home-kpi .a-CardView-header {
  padding: 1.1rem 1.1rem 0.5rem 1.1rem;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

body.nea .nea-home-kpi .a-CardView-body {
  padding: 0 1.1rem 1.1rem 1.1rem;
  position: relative;
  z-index: 2;
}

/* icon wrapper */
body.nea .nea-home-kpi .a-CardView-iconWrap {
  margin-right: 0.85rem;
  flex: 0 0 auto;
}

/* big icon */
body.nea .nea-home-kpi .a-CardView-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  color: #ffffff !important;
  font-size: 1.9rem !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

/* title + number container */
body.nea .nea-home-kpi .a-CardView-headerBody {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* label */
body.nea .nea-home-kpi .a-CardView-title {
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.45rem 0;
}

/* big KPI number */
body.nea .nea-home-kpi .a-CardView-subTitle {
  color: #ffffff !important;
  font-size: 3.2rem !important;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin: 0;
}

/* description/body */
body.nea .nea-home-kpi .a-CardView-mainContent {
  color: rgba(255,255,255,0.90) !important;
  font-size: 0.96rem;
  line-height: 1.45;
  margin-top: 0.45rem;
}

/* remove divider look */
body.nea .nea-home-kpi .a-CardView-body,
body.nea .nea-home-kpi .a-CardView-header {
  border: 0;
}

/* mobile */
@media (max-width: 768px) {
  body.nea .nea-home-kpi .a-CardView {
    min-height: 160px;
  }

  body.nea .nea-home-kpi .a-CardView-subTitle {
    font-size: 2.3rem !important;
  }

  body.nea .nea-home-kpi .a-CardView-icon {
    width: 52px;
    height: 52px;
    font-size: 1.55rem !important;
  }
}
/* =========================================================
   HERO REGION
   Region CSS Class: egp-home-hero
   ========================================================= */

body.nea .nea-home-hero.t-Region {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid rgba(31, 93, 143, 0.10);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(16, 36, 56, 0.08);
  overflow: hidden;
}

/* left accent */
body.nea .nea-home-hero .t-Region-bodyWrap {
  position: relative;
}

body.nea .nea-home-hero .t-Region-bodyWrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: linear-gradient(180deg, #f2c94c 0%, #d4a514 100%);
}

/* subtle top glow */
body.nea .nea-home-hero .t-Region-bodyWrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 90px;
  background: linear-gradient(
    180deg,
    rgba(31, 93, 143, 0.04) 0%,
    rgba(31, 93, 143, 0.00) 100%
  );
  pointer-events: none;
}

body.nea .nea-home-hero .t-Region-body {
  padding: 2rem 1.6rem 1.5rem 1.8rem;
  position: relative;
  z-index: 2;
}

/* heading */
body.nea .nea-home-hero h1,
body.nea .nea-home-hero h2,
body.nea .nea-home-hero h3 {
  margin: 0 0 1rem 0;
  color: #1f2933;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-size: 2.25rem;
}

/* paragraphs */
body.nea .nea-home-hero p {
  margin: 0 0 0.9rem 0;
  color: #334e68;
  line-height: 1.7;
  font-size: 1rem;
}

body.nea .nea-home-hero strong {
  color: #243b53;
  font-weight: 800;
}

/* code / domain chip */
body.nea .nea-home-hero code {
  display: inline-block;
  padding: 0.14rem 0.45rem;
  border-radius: 8px;
  background: rgba(31, 93, 143, 0.08);
  color: #1f5d8f;
  font-size: 0.92rem;
  font-weight: 700;
}

/* prototype url block */
body.nea .nea-home-hero .nea-hero-urls {
  margin: 1rem 0 1rem 0;
  padding: 0.9rem 1rem;
  background: rgba(31, 93, 143, 0.04);
  border: 1px solid rgba(31, 93, 143, 0.08);
  border-radius: 14px;
}

body.nea .nea-home-hero .nea-hero-urls a,
body.nea .nea-home-hero .nea-hero-urls span {
  color: #1f5d8f;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.7;
}

/* buttons row */
body.nea .nea-home-hero .nea-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

/* main CTA */
body.nea .nea-home-hero .nea-hero-actions .t-Button--hot {
  background: linear-gradient(135deg, #1f5d8f 0%, #2a6ea5 100%) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 0.7rem 1.05rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(31, 93, 143, 0.18);
}

/* secondary buttons */
body.nea .nea-home-hero .nea-hero-actions .t-Button:not(.t-Button--hot) {
  background: #ffffff !important;
  border: 1px solid rgba(31, 93, 143, 0.14) !important;
  color: #243b53 !important;
  border-radius: 12px !important;
  padding: 0.7rem 1rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16, 36, 56, 0.05);
}

body.nea .nea-home-hero .nea-hero-actions .t-Button:hover {
  transform: translateY(-1px);
}

/* optional two-column hero layout */
body.nea .nea-home-hero .nea-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.4rem;
  align-items: start;
}

body.nea .nea-home-hero .nea-hero-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,252,0.98) 100%);
  border: 1px solid rgba(31, 93, 143, 0.08);
  border-radius: 16px;
  padding: 1rem 1rem 0.85rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

body.nea .nea-home-hero .nea-hero-panel h4 {
  margin: 0 0 0.7rem 0;
  color: #1f5d8f;
  font-size: 1rem;
  font-weight: 800;
}

body.nea .nea-home-hero .nea-hero-panel p {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

/* responsive */
@media (max-width: 900px) {
  body.nea .nea-home-hero .nea-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.nea .nea-home-hero .t-Region-body {
    padding: 1.5rem 1rem 1.2rem 1.2rem;
  }

  body.nea .nea-home-hero h1,
  body.nea .nea-home-hero h2,
  body.nea .nea-home-hero h3 {
    font-size: 1.8rem;
  }

  body.nea .nea-home-hero .nea-hero-actions {
    gap: 0.5rem;
  }
}

