/* Match the main site: inherit its font, use its blue */
.portal-page, .portal-page *, .portal-footer {
  font-family: inherit;
}
:root {
  --portal-blue: var(--tj-color-theme-primary, #285fa4);
  --portal-blue-dark: #1d4a82;
}

/* Layout */
body { min-height: 100vh; display: flex; flex-direction: column; }
.body_area, #smooth-wrapper { flex: 1; display: flex; flex-direction: column; }
.portal-page { flex: 1; display: flex; flex-direction: column; padding-top: 20px; }
.portal-wrapper { flex: 1; display: flex; align-items: stretch; }
.portal-content { flex: 1; min-width: 0; padding: 40px 24px; }

/* Form panel */
.form-panel {
  background: #f1f4f9;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,.1);
  padding: 30px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  float: none;
}
.form { text-align: center; }
.form h1 { font-size: 32px; font-weight: 600; color: var(--portal-blue); margin-bottom: 8px; }
.form h2 { font-size: 18px; font-weight: 400; color: #333; margin-bottom: 20px; }
.form-group { padding-top: 14px; }

.input-icons .input-field {
  width: 100%; padding: 12px 16px; font-size: 16px;
  border: 1px solid #d5dbe5; border-radius: 4px; background: #fff; color: #333;
  box-sizing: border-box;
}
.input-icons .input-field:focus { outline: none; border-color: var(--portal-blue); }

.submit_btn {
  width: 100%; padding: 12px 15px; font-size: 16px; font-weight: 500;
  background: var(--portal-blue); color: #fff; border: none; border-radius: 4px;
  cursor: pointer; transition: background .3s;
}
.submit_btn:hover { background: var(--portal-blue-dark); }

/* Table */
.table_style { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 15px; text-align: left; background: #fff; }
.table_style thead th { background: var(--portal-blue); color: #fff; padding: 12px; font-weight: 500; }
.table_style tbody td { border: 1px solid #e1e6ee; padding: 10px 12px; }
.table_style tbody tr:nth-child(even) { background: #f6f8fb; }
.download-btn { display: inline-block; padding: 6px 16px; background: var(--portal-blue); color: #fff; border-radius: 4px; text-decoration: none; }
.download-btn:hover { background: var(--portal-blue-dark); color: #fff; }
.no-data { margin-top: 24px; font-size: 20px; color: #333; }

/* Footer */
.portal-footer { background: var(--portal-blue); color: #fff; padding: 18px 24px; font-size: 14px; }
.portal-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.portal-footer a { color: #fff; text-decoration: underline; }

/* Mobile */
.portal-mobile-nav { display: none; }
@media (max-width: 768px) {
  .sidebar { display: none; }
  .portal-wrapper { display: block; }
  .portal-content { padding: 20px 12px; }
  .form-panel { padding: 20px 14px; }
  .form h1 { font-size: 26px; }

  .portal-mobile-nav { display: block; background: var(--portal-blue); }
  .portal-mobile-toggle { width: 100%; text-align: left; padding: 14px 16px; background: none; border: none; color: #fff; font-size: 17px; }
  .portal-mobile-links { display: none; }
  .portal-mobile-links.open { display: block; }
  .portal-mobile-links a { display: block; padding: 12px 16px; color: #fff; text-decoration: none; border-top: 1px solid rgba(255,255,255,.2); }
}
/* Remove the body flex trick, it can conflict with the site's header scripts */
body { display: block !important; min-height: 0 !important; }

/* Push content below the sticky header and keep the footer low */
.portal-page { padding-top: 130px; min-height: 80vh; display: block; }
.portal-wrapper { display: flex; align-items: flex-start; gap: 0; }

/* Sidebar: normal flow, not fixed */
.sidebar {
  position: static !important;
  top: auto !important;
  height: auto !important;
  width: 240px !important;
  flex: 0 0 240px;
  background: #0060A7;
  padding: 24px 0 !important;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { list-style: none; }
.sidebar a { display: block; padding: 10px 20px; color: #fff; font-size: 16px !important; text-decoration: none; }
.sidebar a:hover { color: #1daae2; }

/* Headings: beat the theme's huge sizes */
.portal-page .form h1 { font-size: 30px !important; line-height: 1.3 !important; font-weight: 600; color: #285fa4; margin-bottom: 8px; }
.portal-page .form h2 { font-size: 17px !important; line-height: 1.4 !important; font-weight: 400; margin-bottom: 20px; }
.portal-page .no-data { font-size: 20px !important; }

/* Make sure the button always shows */
.portal-page .submit_btn { display: block; width: 100%; height: auto; }
/* Sidebar colour */
.sidebar {
  background: #0060A7 !important;
  padding: 24px 16px !important;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar li {
  list-style: none;
  margin-bottom: 12px;
}

/* Sidebar buttons */
.sidebar a {
  display: block;
  padding: 12px 18px;
  font-size: 16px !important;
  font-weight: 500;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  text-align: left;
  transition: background .2s, border-color .2s;
}
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: #fff;
  color: #fff !important;
}
.sidebar a.active {
  background: #fff !important;
  color: #0060A7 !important;
  border-color: #fff;
  font-weight: 600;
}
/* More space between the header and the sidebar/box */
.portal-page {
  padding-top: 200px !important;   /* increase for more gap, decrease for less */
}
/* Space between header and content */
.portal-page {
  padding-top: 220px !important;      /* distance from header: increase for more */
  padding-bottom: 100px !important;   /* distance from footer: increase for more */
}
/* Put portal content above the site's invisible full-screen wrapper */
.portal-page {
  position: relative !important;
  z-index: 100 !important;
}
.portal-page input,
.portal-page textarea,
.portal-page button,
.portal-page a {
  pointer-events: auto !important;
}
/* Space between header and sidebar/box, and between sidebar/box and footer */
.portal-page {
  padding-top: 260px !important;      /* header gap: increase for more */
  padding-bottom: 300px !important;   /* footer gap: increase for more */
}
.tj-footer-strip {
  margin-top: 120px !important;
}