/*!
 * Theme: Default
 * Package: NioBoard
 * Version: 1.0.0
 * Updated: 10.21.2022
 * Author: Softnio
 * Author URI: http://themeforest.net/user/softnio
**/

/* ==========================================================================
   Campus Connect brand theme
   ==========================================================================
   The token declarations that used to live here -- the whole --cc-*, --nav-*
   and --bs-* set, in a light block and a dark block -- have moved to the one
   place they are now defined for all four portals:

     packages/ui/src/tokens/tokens.css            (--cc-*, --nav-*, --ds-*)
     packages/ui/src/tokens/bootstrap-bridge.css  (--bs-* -> var(--cc-*))

   Both are imported by this app's src/main.tsx. What remains below is only the
   NioBoard-specific selectors that CONSUME those tokens, which is the part that
   was genuinely per-app. Phase 5 deletes this file along with the template.
   ========================================================================== */

body.dark .card,
body.dark .nk-content .card {
  background-color: var(--cc-surface);
  border-color: var(--cc-border);
  color: var(--cc-text);
}

body.dark .card-inner > .card-title-group,
body.dark .card-inner > .title {
  border-bottom-color: var(--cc-border);
  color: var(--cc-navy);
}

body.dark .card-inner > .card-title-group .card-title .title {
  color: var(--cc-navy);
}

body.dark .nk-tb-list thead th,
body.dark .table thead th {
  background-color: var(--cc-surface2);
  color: var(--cc-text2);
  border-bottom-color: var(--cc-border);
}

body.dark .form-control,
body.dark .form-select {
  background-color: var(--cc-surface);
  border-color: var(--cc-border);
  color: var(--cc-text);
}

body.dark .nav-tabs {
  --bs-nav-tabs-border-color: var(--cc-border);
  --bs-nav-tabs-link-hover-border-color: var(--cc-border) var(--cc-border) var(--cc-border);
  --bs-nav-tabs-link-active-color: var(--cc-text);
  --bs-nav-tabs-link-active-bg: var(--cc-surface);
  --bs-nav-tabs-link-active-border-color: var(--cc-border) var(--cc-border) var(--cc-surface);
}

body.dark .nk-page-breadcrumb .breadcrumb-item {
  color: var(--cc-text3);
}

body.dark .nk-page-breadcrumb .breadcrumb-item.active {
  color: var(--cc-text2);
}

body.dark #nk-page-title-slot .page-title {
  color: var(--cc-navy);
}

body.dark .nk-header.nk-header-fixed > .container-fluid {
  border-bottom-color: var(--cc-border);
  background-color: var(--cc-surface);
}

body.dark .nk-footer-copyright {
  color: var(--cc-text3);
}

body {
  background-color: var(--cc-bg);
  color: var(--cc-text);
  transition: background-color .15s ease, color .15s ease;
}

/* Headings ---------------------------------------------------------------- */

h1, .h1, h2, .h2 {
  font-family: var(--bs-font-display);
  font-weight: 800;
  color: var(--cc-navy);
}

h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--bs-font-display);
  font-weight: 700;
  color: var(--cc-text);
}

.overline-title,
.overline-title-alt {
  font-family: var(--bs-font-display);
  font-weight: 700;
  color: var(--cc-accent);
}

.is-theme .overline-title,
.is-dark .overline-title {
  color: #f8f8f9;
}

/* Font de-leak -----------------------------------------------------------------
   Same fix as before: a handful of selectors in this app's copy of style.css were
   hand-pinned to a different face, bypassing the :root token above. Re-point them
   so every surface resolves to Public Sans consistently. */
.form-control,
.form-select,
.e-grid,
.nk-nav-link,
.nk-footer-copyright,
.breadcrumb-item {
  font-family: var(--bs-font-sans-serif);
}

.btn {
  --bs-btn-font-family: var(--bs-font-sans-serif);
  font-weight: 600;
}

.title {
  font-family: var(--bs-font-display);
  font-weight: 700;
}

.breadcrumb-item {
  font-size: 12px;
  font-weight: 500;
}

/* Page title in the header band --------------------------------------------------
   The title is portaled into the fixed white band (see PageHead.tsx); the breadcrumb
   stays down in the content column. The left padding matches .nk-content's own
   horizontal padding so the title lines up with the left edge of the cards below it. */
#nk-page-title-slot {
  padding-left: 1rem;
}

#nk-page-title-slot .page-title {
  font-family: var(--bs-font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--cc-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Breadcrumb, now stacked directly below the title in the header band ----------- */
.nk-page-breadcrumb {
  margin: 1px 0 0;
  overflow: hidden;
}

.nk-page-breadcrumb .breadcrumb {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nk-page-breadcrumb .breadcrumb-item {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--cc-text3);
}

.nk-page-breadcrumb .breadcrumb-item.active {
  color: var(--cc-text2);
  font-weight: 600;
}

/* Buttons ------------------------------------------------------------------ */

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #A21D23;
  --bs-btn-border-color: #A21D23;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #7A1319;
  --bs-btn-hover-border-color: #7A1319;
  --bs-btn-focus-shadow-rgb: 162, 29, 35;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #7A1319;
  --bs-btn-active-border-color: #7A1319;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #A21D23;
  --bs-btn-disabled-border-color: #A21D23;
  border-radius: 8px;
}

.btn-outline-primary {
  --bs-btn-color: #A21D23;
  --bs-btn-border-color: #A21D23;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #A21D23;
  --bs-btn-hover-border-color: #A21D23;
  --bs-btn-focus-shadow-rgb: 162, 29, 35;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #A21D23;
  --bs-btn-active-border-color: #A21D23;
  --bs-btn-disabled-color: #A21D23;
  --bs-btn-disabled-border-color: #A21D23;
  border-radius: 8px;
}

.btn-soft.btn-primary,
.btn-soft.btn-hover-primary:hover {
  --bs-btn-color: #A21D23;
  --bs-btn-bg: #FBE7EB;
  --bs-btn-border-color: transparent;
}

.btn-soft.btn-outline-primary {
  --bs-btn-color: #A21D23;
  --bs-btn-border-color: #A21D23;
}

.btn-color-primary {
  color: #A21D23;
}

.btn-outline-secondary,
.btn-outline-danger,
.btn.btn-sm {
  border-radius: 8px;
}

/* Form controls -------------------------------------------------------------- */

.form-check-input:checked {
  background-color: #A21D23;
  border-color: #A21D23;
}

.form-control,
.form-select {
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(162, 29, 35, 0.65);
  box-shadow: 0 0 5px 0px rgba(162, 29, 35, 0.2);
}

/* Sidebar / header dark surfaces ---------------------------------------------- */

.nk-sidebar.is-theme {
  background-color: #1E426C;
}

.nk-header.is-theme {
  background-color: #1E426C;
}

.is-theme .nk-menu .nk-menu-sub .active > .nk-menu-link {
  color: #fff;
  opacity: 1;
}

.is-theme .nk-nav .nk-nav-link.active {
  color: #fff;
}

.is-theme .nk-menu {
  padding: 4px 13px 16px;
}

.is-theme .nk-menu-link {
  margin-left: 0;
}

.is-theme .nk-menu > li:first-child > .nk-menu-link {
  margin-top: 0;
}

.nk-header.nk-header-fixed {
  border-bottom: 0;
  box-shadow: none;
}

.nk-header.nk-header-fixed > .container-fluid {
  border-bottom: 1px solid #E2E8F0;
  background-color: #fff;
}

.nk-header.nk-header-fixed > .nk-sidebar-brand {
  border-bottom: 0;
}

.is-theme .nk-menu-item {
  margin-bottom: 4px;
}

.is-theme .nk-menu-link {
  border-radius: 8px;
  padding: 0.625rem 1rem;
  font-family: var(--bs-font-sans-serif);
  font-size: 13.5px;
  font-weight: 600;
}

.is-theme .nk-menu-link::after {
  display: none;
}

.is-theme .nk-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.is-theme .nk-menu-link.active {
  background-color: #A21D23;
  color: #fff;
  font-weight: 700;
}

.is-theme .nk-menu-link.active:hover {
  background-color: #7A1319;
}

.is-theme .nk-menu-link.active .icon {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Collapsible accordion section support (unused here today)
   The Student Portal's nav is a flat list (no section headings), so these
   rules have nothing to style currently -- kept for parity with the CRM Admin
   and Instructor portals, which share this same theme.css structure and do
   have grouped/collapsible nav sections.
   -------------------------------------------------------------------------- */

.is-theme .nk-menu-item.has-sub > .nk-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.is-theme .nk-menu-item.has-sub.active > .nk-menu-link {
  background-color: rgba(162, 29, 35, 0.32);
  color: #fff;
  font-weight: 700;
}

.is-theme .nk-menu-item.has-sub.active > .nk-menu-link:hover {
  background-color: rgba(162, 29, 35, 0.45);
}

.is-theme .nk-menu-item.has-sub.active > .nk-menu-link .nk-menu-caret {
  opacity: 0.9;
}

.is-theme .nk-menu-item.has-sub:not(.active) > .nk-menu-link {
  color: rgba(255, 255, 255, 0.85);
}

.is-theme .nk-menu-caret {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.55;
  transition: transform 0.2s ease;
  transform: rotate(-90deg);
}

.is-theme .nk-menu-caret.is-open {
  transform: rotate(0deg);
}

.is-theme .nk-menu-item.has-sub {
  margin-bottom: 2px;
}

.is-theme .nk-menu-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}

.is-theme .nk-menu-collapse.is-open {
  grid-template-rows: 1fr;
}

.is-theme .nk-menu-collapse > .nk-menu-sub {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0.24s;
}

.is-theme .nk-menu-collapse.is-open > .nk-menu-sub {
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .is-theme .nk-menu-collapse,
  .is-theme .nk-menu-collapse > .nk-menu-sub,
  .is-theme .nk-menu-caret {
    transition: none;
  }
}

.is-theme .nk-menu-sub {
  padding: 0 0 0 8px;
  margin-left: 10px;
  border-left: 1px solid rgba(175, 191, 209, 0.25);
}

.is-theme .nk-menu-sub > .nk-menu-item:first-child {
  margin-top: 4px;
}

.is-theme .nk-menu-sub > .nk-menu-item:last-child {
  margin-bottom: 4px;
}

.is-theme .nk-menu-sub .nk-menu-link {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  padding-left: 0.75rem;
  font-weight: 500;
}

/* Content surfaces & spacing --------------------------------------------------
   The vendor sheet ships `.card-inner` with no padding of its own, so card content
   sat flush against the card edge. These rules restore a consistent internal
   rhythm across every card, table and form on the page. */

.nk-content {
  padding: 1.75rem 1rem 2.5rem;
}

.nk-content .card,
.card {
  border-color: #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 32, 51, .06), 0 1px 3px rgba(16, 32, 51, .05);
}

.card {
  --bs-card-spacer-y: 1.5rem;
  --bs-card-spacer-x: 1.5rem;
}

.card-inner {
  padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x);
}

@media (max-width: 575.98px) {
  .card {
    --bs-card-spacer-y: 1.125rem;
    --bs-card-spacer-x: 1.125rem;
  }
}

.card-inner > .card-title-group {
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #E2E8F0;
}

.card-inner > .card-title-group .card-title .title {
  font-family: var(--bs-font-display);
  font-weight: 700;
  color: #1E426C;
}

.card-inner > .title {
  font-family: var(--bs-font-display);
  font-weight: 700;
  color: #1E426C;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #E2E8F0;
}

.card-inner:has(> .card-amount) > .card-title-group {
  padding-bottom: 0;
  margin-bottom: 0.5rem;
  border-bottom: 0;
}

/* Tables ---------------------------------------------------------------------- */

.table > :not(caption) > * > * {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.nk-tb-list thead th,
.table thead th {
  font-family: var(--bs-font-sans-serif);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8B99AA;
  background-color: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

.table-responsive {
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
}

.card-inner > div > .table-responsive > .table:last-child,
.card-inner > .table-responsive > .table:last-child {
  margin-bottom: 0;
}

/* Forms ------------------------------------------------------------------------ */

.card-inner .form-label {
  font-family: var(--bs-font-sans-serif);
  font-weight: 700;
  font-size: 0.71875rem;
  letter-spacing: 0.02em;
  color: #5B6B7F;
  margin-bottom: 0.375rem;
}

.nk-block + .nk-block,
.row.g-gs + .row.g-gs {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .col-md-2-4 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

.nk-mega-nav {
  display: flex;
  align-items: stretch;
  height: 44px !important;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.nk-mega-item {
  position: static;
  display: flex;
  align-items: stretch;
}

.nk-mega-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--nav-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}

.nk-mega-trigger:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
  text-decoration: none;
}

.nk-mega-trigger.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  text-decoration: none;
}

.cui-shell #nk-page-title-slot .page-title,
.cui-shell .page-title {
  color: #ffffff;
  font-family: var(--bs-font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

