
/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  --tile-radius: 12px;
  --tile-img-height: 220px;
  --tile-img-padding: 12px;
  --tile-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --tile-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.12);
  --container-gap: 16px;
}

/* ===========================
   GLOBAL LAYOUT
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  margin: 0 auto;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===========================
   HEADER
   =========================== */

.portal-header {
  background-color: #ffdb59; /* enforced brand color */
  padding: 8px 0;
}

.header-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--container-gap);
}

.header-left,
.header-right {
  flex: 1 1 300px;
  min-width: 280px;
}

.portal-header h1 {
  margin: 0 0 8px 0;
}

.balance-label {
  margin: 0;
  text-align: right;
  color: var(--portalThemeColor9, #333);
}

.balance-amount {
  margin: 0;
  text-align: right;
}

/* ===========================
   ROLE SECTIONS
   =========================== */

.role-section {
  padding: 8px 0;
}

.role-section .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===========================
   TILE GRID & CARDS
   =========================== */

.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--container-gap);
}

.tile-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: var(--tile-radius);
  overflow: hidden;
  box-shadow: var(--tile-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  flex: 1 1 calc(33.333% - var(--container-gap));
  min-width: 260px;
}

.tile-card:hover {
  box-shadow: var(--tile-shadow-hover);
  transform: translateY(-2px);
}

.tile-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--tile-img-height);
  padding: var(--tile-img-padding);
  width: 100%;
  background: transparent;
}

.tile-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  background-color: transparent;
  padding: 12px 10px;
}

.tile-link h3 {
  margin: 8px 6px;
  text-align: center;
}

/* For non-anchor tile-link used in School/Students cards */
.tile-link[role="link"] {
  cursor: pointer;
}

/* ===========================
   UNAUTHENTICATED
   =========================== */

.unauthenticated {
  padding: 24px 0;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 992px) {
  .tile-card {
    flex: 1 1 calc(50% - var(--container-gap));
  }
}

@media (max-width: 576px) {
  :root {
    --tile-img-height: 160px;
    --tile-img-padding: 10px;
    --tile-radius: 10px;
  }

  .header-left,
  .header-right {
    min-width: 100%;
  }

  .tile-card {
    flex: 1 1 100%;
  }
}



/* Page heading container */
.page-heading {
  background-color: #FFD966;   /* yellow bar */
  margin-bottom: 16px;
}

/* Align heading with table/list width */
.page-heading-inner {
  max-width: 1140px;          /* match table container */
  margin: 0 auto;
  padding: 10px 16px;
}

/* Make header logo bigger (works even if nested) */
.navbar .navbar-brand img,
.navbar .navbar-brand svg {
  height: 80px !important;   /* desktop target */
  width: auto !important;
  max-height: 60px !important;
}

/* Mobile */
@media (max-width: 991px) {
  .navbar .navbar-brand img,
  .navbar .navbar-brand svg {
    height: 40px !important;
    max-height: 40px !important;
  }
}

/* Keep the brand area aligned vertically */
.navbar .navbar-brand {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}


.breadcrumb {
  display: none !important;
}

/* Standard Entity List - remove vertical scroll on list when row expands */
.entitylist .table-responsive {
    max-height: none !important;   /* remove any height cap */
    overflow-y: visible !important; /* don't show a scroll bar */
}

/* Just in case the tbody was given its own scrolling */
.entitylist .table-responsive tbody {
    max-height: none !important;
    overflow-y: visible !important;
}