/*
 * STI College of Dasmariñas — floating navigation + strict blue/gold portal v4
 * Loaded last to override all legacy KLD/green portal rules.
 */
:root {
  --sti-v4-blue: #0057a8;
  --sti-v4-navy: #062f63;
  --sti-v4-deep: #031f42;
  --sti-v4-gold: #fdb515;
  --sti-v4-gold-soft: #fff3c4;
  --sti-v4-text: #102d4f;
  --sti-v4-muted: #60758b;
  --sti-v4-line: #c6d9eb;
}

/* Page canvas: STI blue/gold, no legacy green wash. */
html body.portal-page.kld-nextly-theme {
  background:
    radial-gradient(circle at 5% 8%, rgba(0,87,168,.13), transparent 28%),
    radial-gradient(circle at 96% 10%, rgba(253,181,21,.15), transparent 30%),
    linear-gradient(145deg,#f8fbff 0%,#eef5fc 55%,#fffaf0 100%) !important;
  color: var(--sti-v4-text) !important;
}

/*
 * Remove the full-width white/header shell marked by the user.
 * Only the rounded navbar remains visible, so it looks genuinely floating.
 */
html body.portal-page.kld-nextly-theme header.kld-nextly-header {
  position: fixed !important;
  inset: 18px 24px auto 24px !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}
html body.portal-page.kld-nextly-theme header.kld-nextly-header::before,
html body.portal-page.kld-nextly-theme header.kld-nextly-header::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body.portal-page.kld-nextly-theme header.kld-nextly-header > .kld-nextly-navbar {
  width: min(1680px, 100%) !important;
  max-width: 1680px !important;
  min-height: 96px !important;
  margin: 0 auto !important;
  padding: 18px 24px 18px 30px !important;
  overflow: visible !important;
  border: 1px solid rgba(166,195,222,.82) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 96% 0%, rgba(253,181,21,.14), transparent 26%),
    linear-gradient(112deg,rgba(241,247,255,.97),rgba(255,255,255,.98) 52%,rgba(255,250,235,.97)) !important;
  box-shadow: 0 20px 52px rgba(4,51,102,.18) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.08) !important;
  pointer-events: auto !important;
}

/* STI blue/gold hero — force out every legacy green gradient. */
html body.portal-page.kld-nextly-theme section.portal-hero,
html body.portal-page.kld-nextly-theme section.employee-dashboard-hero,
html body.portal-page.kld-nextly-theme section.student-dashboard-hero,
html body.portal-page.kld-nextly-theme .employee-profile-hero {
  color: #fff !important;
  border: 1px solid rgba(253,181,21,.45) !important;
  background:
    radial-gradient(circle at 91% 16%, rgba(253,181,21,.32), transparent 27%),
    radial-gradient(circle at 100% 100%, rgba(255,255,255,.09), transparent 31%),
    linear-gradient(118deg,var(--sti-v4-deep) 0%,var(--sti-v4-navy) 40%,var(--sti-v4-blue) 78%,#0b6bc2 100%) !important;
  box-shadow: 0 20px 48px rgba(2,48,98,.24) !important;
}
html body.portal-page.kld-nextly-theme section.portal-hero::before,
html body.portal-page.kld-nextly-theme section.portal-hero::after,
html body.portal-page.kld-nextly-theme section.employee-dashboard-hero::before,
html body.portal-page.kld-nextly-theme section.employee-dashboard-hero::after,
html body.portal-page.kld-nextly-theme section.student-dashboard-hero::before,
html body.portal-page.kld-nextly-theme section.student-dashboard-hero::after {
  border-color: rgba(253,181,21,.17) !important;
  background: transparent !important;
}
html body.portal-page.kld-nextly-theme :is(.portal-hero,.employee-dashboard-hero,.student-dashboard-hero,.employee-profile-hero)
:is(h1,h2,h3,h4,p,span,strong,b,small,em) {
  color: #fff !important;
}
html body.portal-page.kld-nextly-theme :is(.portal-hero,.employee-dashboard-hero,.student-dashboard-hero) .eyebrow {
  color: #ffe69a !important;
  background: rgba(3,31,66,.34) !important;
  border-color: rgba(253,181,21,.52) !important;
}
html body.portal-page.kld-nextly-theme .employee-hero-meta > span,
html body.portal-page.kld-nextly-theme .student-hero-meta > span {
  color: #fff !important;
  background: rgba(3,31,66,.44) !important;
  border-color: rgba(253,181,21,.42) !important;
}
html body.portal-page.kld-nextly-theme .employee-dashboard-time,
html body.portal-page.kld-nextly-theme .student-dashboard-time {
  color: #fff !important;
  background: rgba(3,31,66,.58) !important;
  border-color: rgba(253,181,21,.42) !important;
}
html body.portal-page.kld-nextly-theme .employee-dashboard-time small,
html body.portal-page.kld-nextly-theme .student-dashboard-time small {
  color: #ffe69a !important;
}

/* No semantic green on portal badges, links, statuses, or action cards. */
html body.portal-page.kld-nextly-theme :is(
  .badge.good,.badge.success,.status-good,.status-success,.chip.good,.tag.good,
  .live-badge,.online-badge,.active-status,.text-success,.text-green,.green-text
) {
  color: var(--sti-v4-navy) !important;
  background: #eaf4ff !important;
  border-color: #b8d5ee !important;
}
html body.portal-page.kld-nextly-theme :is(.bg-success,.bg-green,.green-bg) {
  color: var(--sti-v4-navy) !important;
  background: #eaf4ff !important;
}
html body.portal-page.kld-nextly-theme :is(.border-success,.border-green) {
  border-color: #b8d5ee !important;
}
html body.portal-page.kld-nextly-theme .employee-action-center .badge.good,
html body.portal-page.kld-nextly-theme .employee-connection-panel .badge.good,
html body.portal-page.kld-nextly-theme .student-action-center .badge.good,
html body.portal-page.kld-nextly-theme .student-connection-panel .badge.good {
  color: #6c4600 !important;
  background: var(--sti-v4-gold-soft) !important;
  border-color: #f6cf63 !important;
}
html body.portal-page.kld-nextly-theme .employee-connection-list :is(b,strong),
html body.portal-page.kld-nextly-theme .student-connection-list :is(b,strong),
html body.portal-page.kld-nextly-theme .employee-activity-item :is(b,strong) {
  color: var(--sti-v4-navy) !important;
}

/* Keep cards readable and consistent with the admin STI theme. */
html body.portal-page.kld-nextly-theme :is(
  .portal-stat,.portal-card-panel,.portal-panel,.portal-section,
  .employee-action-center,.employee-connection-panel,.employee-activity-card,.employee-announcement-card,
  .student-action-center,.student-connection-panel,.student-master-profile,.portal-student-detail-group
) {
  color: var(--sti-v4-text) !important;
  background: #fff !important;
  border-color: var(--sti-v4-line) !important;
  box-shadow: 0 14px 34px rgba(4,57,112,.09) !important;
}
html body.portal-page.kld-nextly-theme .portal-stat strong {
  color: var(--sti-v4-navy) !important;
}
html body.portal-page.kld-nextly-theme :is(.portal-stat,.portal-card-panel,.portal-panel,.portal-section) :is(p,small,em) {
  color: var(--sti-v4-muted) !important;
}

/* Active nav uses STI blue underline with a gold endpoint. */
html body.portal-page.kld-nextly-theme .kld-nextly-top-text::after,
html body.portal-page.kld-nextly-theme .kld-nextly-mobile-text::after,
html body.portal-page.kld-nextly-theme .kld-nextly-sub-text::after {
  background: linear-gradient(90deg,var(--sti-v4-blue),var(--sti-v4-gold)) !important;
}

@media (max-width: 900px) {
  html body.portal-page.kld-nextly-theme header.kld-nextly-header {
    inset: 10px 12px auto 12px !important;
  }
  html body.portal-page.kld-nextly-theme header.kld-nextly-header > .kld-nextly-navbar {
    width: 100% !important;
    min-height: 76px !important;
    border-radius: 20px !important;
    padding: 12px 14px !important;
  }
}
