html, body { 
  height: 100%; 
}

body{
  background-color:#f8f9fa;
  font-family:'Segoe UI',sans-serif;
  overflow-x:hidden;
  display:flex;
  flex-direction:column;
}

/* MAIN CONTENT */

.main-content {
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 80px;
}

h2 { 
  color: #2D3C5A; 
}

/* Cards */

.card {
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Entity Card */

.entity-card{
  border:none;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 10px 35px rgba(0,0,0,.07);
}

.entity-card .card-header{
  background:#1f2937;
  color:#fff;
  padding:22px 28px;
  border:none;
}

.entity-card .card-body{
  padding:30px;
}

/* Buttons */

.btn-primary {
  background-color: #2D3C5A;
  border-color: #2D3C5A;
}

.btn-primary:hover {
  background-color: #1B2536;
  border-color: #1B2536;
}

/* Professional Program Buttons */

.btn-modern.btn-program-select{
  display:flex;
  align-items:center;
  gap:12px;

  width:100%;
  padding:14px 18px;

  border-radius:14px;
  border:1px solid #d8b14b;

  background:#ffffff;
  color:#1f2937;

  font-size:.95rem;
  font-weight:700;
  letter-spacing:.2px;

  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transition:all .25s ease;
}

.btn-modern.btn-program-select:hover{
  background:#f7c948;
  border-color:#f7c948;
  color:#111827;

  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(0,0,0,.12);
}

.btn-program-icon{
  width:34px;
  height:34px;

  border-radius:50%;

  background:#f8f0d2;
  color:#9a6b00;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:1rem;
  flex-shrink:0;

  transition:all .25s ease;
}

.btn-modern.btn-program-select:hover .btn-program-icon{
  background:#fff;
  color:#8a5a00;
}

.btn-arrow{
  margin-left:auto;
  font-size:.85rem;
  opacity:.8;
}

/* Portal Cards */

.portal-card-link{
  text-decoration:none;
  color:inherit;
  display:block;
}

.portal-card-link:hover{
  text-decoration:none;
  color:inherit;
}

.link-card{
  height:100%;
  background:#fff;
  border-radius:18px;
  border:1px solid #ececec;
  padding:24px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition:all .25s ease;
  box-shadow:0 4px 14px rgba(0,0,0,.05);
}

.link-card:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 32px rgba(0,0,0,.10);
  border-color:#f0c14b;
}

.link-card-top h5{
  font-size:1.2rem;
  font-weight:700;
  color:#1f2937;
  margin-bottom:10px;
}

.link-card-top p{
  color:#6b7280;
  margin-bottom:0;
  line-height:1.6;
}

.link-card-bottom{
  margin-top:24px;
}

/* Welcome Badge */

.page-intro{
  margin-bottom:28px;
}

.welcome-badge{
  display:inline-flex;
  align-items:center;
  background:#fff7db;
  color:#8a6300;
  border:1px solid #f0d37b;
  padding:8px 14px;
  border-radius:999px;
  font-size:.9rem;
  font-weight:600;
}

.portal-section-title{
  font-weight:700;
  color:#1f2937;
}

/* Section Icon */

.section-icon{
  width:52px;
  height:52px;
  border-radius:14px;
  background:rgba(255,255,255,.15);

  display:flex;
  align-items:center;
  justify-content:center;
}

/* Sticky header */

header{
  background-color:#1B2536;
  color:#fff;
  padding:1rem 0;
  position:sticky;
  top:0;
  z-index:1030;
}

/* Ensure content can scroll and doesn't hide behind sticky footer */

.dashboard-wrapper{ 
  flex:1 1 auto; 
}

/* Header icons */

.header-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.header-icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.header-icon-btn:hover {
  background: rgba(255,255,255,.2);
}

.header-icon-btn:focus{ 
  box-shadow:none; 
}

/* Notification badge */

.notif-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
}

.notif-badge{
  position:absolute;
  top:-6px;
  right:-2px;
  font-size:.65rem;
  padding:.15rem .35rem;
  border-radius:999px;
  background:#dc3545;
  color:#fff;
}

/* Account dropdown */

.account-dropdown .btn{
  color:#fff;
  border:none;
  background:transparent;
  padding:.25rem .5rem;
}

.account-dropdown .btn:focus{ 
  box-shadow:none; 
}

.account-dropdown .btn:hover{ 
  color:#ced4da; 
}

/* Dashboard wrapper */

.dashboard-wrapper{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  margin-top: 0;
  padding-top: 0;
}

/* Sticky sidebar */

:root {
  --dashboard-header-height: 74px;
}

.sidebar{
  width: 300px;
  background-color: #2D3C5A;
  color: white;

  position: sticky;
  top: var(--dashboard-header-height);
  height: calc(100vh - var(--dashboard-header-height));
  overflow-y: auto;
  overflow-x: hidden;

  transition: width 0.25s ease;
  padding-top: 0;
  align-self: flex-start;
}

.sidebar.collapsed{ 
  width: 72px; 
}

.toggle-btn {
  cursor: pointer;
  padding: 12px 20px;
  display: block;
  background-color: #1B2536;
  text-align: center;
}

.sidebar-header {
  background-color: #1B2536;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-header button {
  border: none;
  background: transparent;
  color: white;
  padding: .25rem .5rem;
}

.sidebar-header button:hover {
  color: #ced4da;
}

/* Sidebar links */

.sidebar .nav-item > a,
.sidebar .nav-item > button {
  width: 100%;
  text-align: left;
  color: #fff;
  padding: 12px 18px;
  text-decoration: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar .nav-item > a:hover,
.sidebar .nav-item > button:hover {
  background-color: #1B2536;
}

.sidebar .nav-item i { 
  width: 18px; 
  text-align: center; 
}

/* Submenu */

.sidebar .submenu {
  padding: 6px 0 10px 0;
  margin: 0;
  list-style: none;
  display: none;
}

.sidebar .submenu a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 8px 18px 8px 48px;
  opacity: 0.95;
}

.sidebar .submenu a:hover {
  background-color: #1B2536;
}

/* Expanded submenu */

.sidebar .nav-item.open .submenu { 
  display: block; 
}

/* Collapsed behavior */

.sidebar.collapsed .label { 
  display: none; 
}

.sidebar.collapsed .submenu { 
  display: none !important; 
}

/* Sticky footer */

.footer{
  background-color:#1B2536;
  color:#fff;
  width:100%;
  position:sticky;
  bottom:0;
  z-index:1020;
  margin-top:auto;
}

/* Responsive */

@media (max-width: 991px) {

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    max-height: none;
  }

  .entity-card .card-body{
    padding:22px;
  }

  .link-card{
    padding:20px;
  }

}