body {
  font-family: -apple-system, BlinkMacSystemFont, Verdana, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: small;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga", "kern";
  text-size-adjust: 100%;
}

img {
  border: 0;
  vertical-align: middle;
}

.stu_photo {
  border-radius: 1rem;
  height: 180px;
  width: 170px;
  object-fit: cover;
}

/* Block styles */
.blockOuter {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 12px;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.12),
    0 4px 12px -2px rgba(0, 0, 0, 0.08);
  position: relative;
  isolation: isolate; /* ensures inner blending doesn't bleed */
}

.blockOuter--temporary {
  background: linear-gradient(135deg, #9333ea, #7e22ce);

  & > .blockInner {
    border: 2px solid #9333ea;
  }
}

.blockInner {
  background: #ffffff;
  padding: 10px;
  border-radius: 6px 6px 10px 10px;
  border: 2px solid #2563eb;
}

.blockTitle {
  padding: 6px 8px 4px 8px; /* unchanged */
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.blockTitle img {
  height: 23px;
  width: auto;
}

.logoArea {
  max-width: 2100px;
  margin: auto;
  display: flex;
  place-content: space-between;
  padding-bottom: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

.menu {
  display: flex;
  place-items: center;
  min-width: max-content;
  max-width: 2100px;
  margin: auto;
  height: 60px;
}

.menuArea {
  background: #e1e5e917;
  border-top: 2px solid #e1e5e9;
  border-bottom: 2px solid #e1e5e9;
  margin-left: -8px;
  margin-right: -8px;
}

/* User Profile Card Styles */

.userProfileCard {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 12px 16px;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.userAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
  position: relative;
}



/* Test Mode HUD Effect */
.test-hud-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px dashed #f59e0b; /* Amber for caution/test */
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: hud-spin 6s linear infinite;
  pointer-events: none;
}

.test-hud-ring-inner {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 1px dotted #10b981; /* Emerald for system active */
  opacity: 0.6;
  animation: hud-spin-reverse 10s linear infinite;
  pointer-events: none;
}

@keyframes hud-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hud-spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.userInfo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0; /* allows text truncation to work */
}

.userName {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.userEmail {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settingsLink {
  color: #94a3b8;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  margin-right: -8px; /* Alignment adjustment */
}

.settingsLink:hover {
  background-color: #f1f5f9;
  color: #475569;
}

.settingsLink svg {
  transition: transform 0.5s ease;
}

.settingsLink:hover svg {
  transform: rotate(90deg);
}

/* Responsive design for user profile card */
@media (max-width: 768px) {
  .userProfileCard {
    min-width: unset;
    padding: 10px;
    gap: 12px;
  }

  .userAvatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .userName {
    font-size: 14px;
  }

  .userEmail {
    display: none; /* Hide email on small screens to save space */
  }

  .userStatus {
    font-size: 10px;
    padding: 1px 6px;
  }
}

/* Footer styles */
.footerArea {
  padding-top: 28px;
  padding-bottom: 20px;
  text-align: center;
  font-size: 12px;
  color: #757575;
  border-top: 2px solid #e1e5e9;
  margin-left: -8px;
  margin-right: -8px;
  margin-top: 20px;
}

/* Core styles */
.spoiler {
  background-color: gray;
  color: transparent;
  font-size: large;
  padding-right: 15px;
}

.spoiler:hover {
  background-color: inherit;
  color: inherit;
}

.loginBack {
  background-color: #d5d6db;
}

.loginMain {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 260px;
  gap: 1rem;
}

.loginLogo {
  max-width: 650px;
}

.loginMainArea {
  background: #fafbff40;
  border-radius: 2rem;
  border: 1px solid #00000029;
  width: 350px;
  padding: 25px;
  margin: 5px;
  text-align: center;
}

.loginTitle {
  font-weight: bold;
  font-size: medium;
  text-align: center;
}

.loginNote {
  border: 2px solid #f8ba01;
  background: #fff3dd;
  margin-top: 4px;
  padding: 3px;
  text-align: center;
}

.loginWarning {
  border: 2px solid #f00;
  background: #ffd9da;
  margin-top: 4px;
  padding: 3px;
  text-align: center;
}

.logoutNote {
  border: 2px solid #78f57b;
  background: #d1fcd2;
  margin-top: 4px;
  padding: 3px;
  text-align: center;
}

/* Utility classes */
#verticaltextSAR {
  writing-mode: bt-rl;
}

:focus-visible {
  outline: none;
}

.boxTopText {
  color: #ffffff;
  font-weight: bold;
  margin-top: -2px;
  padding-bottom: 9px;
}

.boxSpacer {
  height: 5px;
}

.col {
  float: left;
}

.colClear {
  clear: both;
}

.divCol {
  display: inline;
  float: left;
}

.grayImage {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}

.pageBody {
  max-width: 2100px;
  margin: auto;
  min-height: calc(100vh - 298px);
}

.home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
  gap: 1rem;
}

.homeCol {
  display: flex;
  flex-flow: column;
  gap: 1rem;
}

.mainTitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 14px;
}

.mainTitle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.18);
}

.subTitle {
  margin: 32px 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: #333;
}

.subTitle::before,
.subTitle::after {
  content: "";
  flex: 1 1 90px;
  height: 4px;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  min-width: 60px;
  max-width: 140px;
}

.tabDivider {
  padding: 12px 16px 12px 16px;
  margin: 16px 0 16px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  border-radius: 8px;
  font-weight: 600;
  color: #495057;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.tabDivider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
}

/* List styles */
.listUnstyled {
  list-style-type: none;
  margin-block-start: unset;
  margin-block-end: unset;
  padding-inline-start: 0;
}

/* Page bars */
.barConfidential {
  border: 2px solid #ffd69d;
  background: #fff5d7;
  font-style: inherit;
  text-align: center;
  padding: 3px;
  margin-bottom: 2px;
}

.divBar {
  background: #d2eeff;
  border-bottom: 2px solid #0093ff;
  padding: 10px;
  margin: 10px 0;
  font-weight: bold;
}

/* Box styles */
.box {
  background: #fafbfc;
  border: 2px solid #d9e1e8;
  border-radius: 10px;
  padding: 18px;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

.box--saved {
  border-color: #69ff37;
  background: #e2fcd8;
  margin-bottom: 5px;
  text-align: center;
}

.box--notfound {
  border-color: #f4a733;
  background: #fce3be;
  text-align: center;
}

.box--skeleton {
  border: 2px dashed #c5cdd5;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7a8a99;
  cursor: pointer;
  transition: all 0.2s ease;
}

.box--skeleton:hover {
  border-color: #0093ff;
  color: #0093ff;
  background: #f0f8ff;
}

.box--error {
  border-color: #ff0000;
  background: #ffcccc;
}

.box--warn {
  border-color: #ff8e00;
  background: #fff1da;
}

.box--info {
  border-color: #93c9ff;
  background: #d2e8ff;
}

/* Favourites styles */
.favButton {
  border: 2px solid #09f;
  padding: 5px 10px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 0.25rem;
}

.favButton:hover {
  border: 2px solid #06f;
  background: #d2ebff;
}

.favButton.active {
  border: 2px solid #06f;
  background: #80c6ffa5;
  color: #000;
}

/* GrayBlock styles */
.grayBlock {
  position: relative;
  cursor: pointer;
  background: #f0f0f0;
  padding: 7px;
  width: 180px;
  height: 90px;
  transition: 0.5s ease;
}

.grayBlock:hover {
  background: #e1e1e1;
  transition: 0.5s ease;
}

.grayBlock > .blockSpacedTitle {
  margin: 10px 0;
  font-weight: bold;
}

.grayBoxButtonBL {
  position: absolute;
  bottom: 5px;
  right: 5px;
}

/* Expand Derivative styles */
.expandBlock {
  background: #f0f0f0;
  padding: 10px 12px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: 0.2s ease;
  border-radius: 6px;
}

.expandBlock::before {
  content: '\25B6';
  display: inline-block;
  margin-right: 8px;
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.expandBlock[show="1"]::before {
  transform: rotate(90deg);
}

.expandBlock:hover {
  background: #e4e4e4;
}

.expandBlock > div {
  background: #fff;
  margin: 10px -10px -8px -10px;
  padding: 10px;
  display: none;
  border-radius: 0 0 4px 4px;
}

/* Search table styles */
.searchTable {
  border-spacing: 0;
  border-radius: 10px;
  overflow: clip;
  border-collapse: collapse;
}

.searchTable th,
td {
  padding: 7px;
}

.searchTable tbody td:not(:last-child) {
  border-right: 1px solid #eee;
}

.searchTable tbody tr:nth-of-type(even):not(:first-child) {
  border-bottom: 1px solid transparent;
}

.searchTable tbody tr:nth-of-type(odd):not(:first-child) {
  background-color: #f8f9fa;
  border-bottom: 1px solid transparent;
}

.searchTable tbody tr:hover:not(:first-child) {
  background-color: #add8e655;
}

.searchTableTop {
  height: 40px;
  background: linear-gradient(to bottom, #5c7eb0 0%, #40628d 100%);
  color: #ffffff;
}

.searchTableTopSticky {
  height: 40px;
  background: linear-gradient(to bottom, #5c7eb0 0%, #40628d 100%);
  color: #ffffff;
  position: sticky;
  top: -1px;
  z-index: 1; /* ensure it paints above rows */
}

.searchTableBottom {
  height: 28px;
  background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%);
  border-top: 1px solid #999999;
  font-size: 0.6rem;
  font-weight: bold;
}

/* Subject report styles */
.reportBox {
  border: 1px solid #666;
  background: #fff;
  padding: 6px;
}

/* Button styles */
.but {
  display: inline-block;
  box-sizing: border-box;
  padding: 6px 14px;
  border-radius: 0.3rem;
  min-width: 90px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  text-decoration: none;
  color: #000000;
  border: 2px solid #2587d8;
  background: #cae2ff;
}

.but:hover {
  background: #80c6ff;
}

/* Button modifiers (BEM-style) */
.but--danger {
  border-color: #b70000;
  background: #ffbcbd;
}

.but--danger:hover {
  background: #ff7578;
}

.but--warning {
  border-color: #fdc248;
  background: #fff9cc;
}

.but--warning:hover {
  background: #fcf19f;
}

.but--disabled {
  cursor: not-allowed;
  color: #686868;
  background-color: #9b9b9b9d;
  border: 2px solid #9b9b9b;
  border-radius: 0.3rem;
  transition: 0.3s ease;
  opacity: .5;
  appearance: none;
  padding: 6px 12px;
}

.but--disabled:hover {
  background-color: #9b9b9b9d;
}

.but--success {
  border-color: #059669;
  background: #d1fae5;
}

.but--success:hover {
  background: #6ee7b7;
}

.filterButton {
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  padding: 6px;
  margin: 0 2px;
  text-decoration: none;
  color: #000000;
  border: 2px solid #636363;
  border-radius: 0.3rem;
  background: #cfcfcf;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
}

.filterButton:hover {
  background: #b2b2b2;
}

.filterButton.selected {
  border: 2px solid #2587d8 !important;
  background: #80c6ff !important;
}

/* Report headlines */
.headline__report {
  margin: 30px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: fit-content;
  text-align: center;
}

.headline__report > div {
  border: 2px solid #0093ff;
  background: #dcecff;
  color: #40628d;
  flex: 1 1 0;
  min-width: fit-content;
  border-radius: 0.5rem;
  padding: 15px;
}

.headline__report > div > span {
  font-size: large;
}

.subheadline__report {
  border: 2px solid #008000 !important;
  background: #c0ffc0 !important;
  color: #008000 !important;
}

/* Text styles */
.textEllipsis {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.small-label {
  display: inline-block;
  font-size: 0.75rem;
  color: #ffffff;
  background-color: #007bff;
  padding: 3px 6px;
  border-radius: 12px;
  letter-spacing: 1px;
  line-height: 1;
}

.status-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid #e5e5e5;
}

.status-item:last-child {
  border-bottom: none;
}

.status-name {
  font-weight: 500;
}

.status-details {
  display: flex;
  align-items: center;
}

.status-text {
  color: #4b5563;
  margin-right: 5px;
}

.status-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.status-time {
  font-size: 12px;
}

/* jQuery styles */
.jqHide {
  display: none;
}

.jqShow {
  display: block;
}

.jqShowFlex {
  display: flex;
}

#tabs:not(.ui-tabs) {
  visibility: hidden;
}

.ui-tooltip {
  border-radius: 0.5rem;
  box-shadow: 0 0 2px darkgrey;
}

.ui-tabs-nav {
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
}

/* ===================================
   Filter Panel Styles (Reusable)
   =================================== */

.filter-form {
  align-self: flex-start;
  position: sticky;
  top: 20px;
  width: 320px;
  margin-bottom: 20px;
}

.filter-form.is-sticky {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.04), 0 4px 14px -4px rgba(0, 0, 0, 0.12);
}

.filter-form h4,
.filter-form .filter-heading {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: #4b5563;
}

.filter-section {
  margin-top: 14px;
  padding-top: 7px;
  border-top: 1px solid #eef2f5;
}

.filter-form > h4 + .filter-section,
.filter-form > h4 + * > .filter-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.filter-grid.single {
  grid-template-columns: 1fr;
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-row label {
  font-weight: 600;
  color: #374151;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.filter-actions .but,
.filter-actions .but--danger,
.filter-actions .but but--danger {
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
}

.filter-sub-legend {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-hint {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.2;
  display: block;
  margin-top: 2px;
}

/* Uniform input sizing within filters */
.filter-form .filter-row .input,
.filter-form .filter-row select.input,
.filter-form .filter-row input.input {
  width: 100%;
  box-sizing: border-box;
}

.filter-form .inputWithSuffix {
  width: 100%;
}

.filter-form .inputWithSuffix > .input {
  flex: 1 1 auto;
  width: 100%;
}

.filter-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
