
/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #f0f4f8 !important;
  background-image: none !important;
  color: #1e293b;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

/* --- Full Width Layout --- */
.pagewidth {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 24px;
}

#main-mid,
#main-mid-500,
#main-mid-600 {
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px !important;
  float: none !important;
  background: none !important;
  background-image: none !important;
  min-height: auto !important;
  max-height: none !important;
}

#page {
  font-family: inherit;
}

#curveWid {
  display: none;
}

/* --- Tables: neutralize table layout --- */
table {
  border-collapse: collapse;
  width: 100%;
  border: 0;
}

td {
  vertical-align: top;
  padding: 4px 6px;
}

/* --- Top-level layout: search + login side by side --- */
#tdleft {
  vertical-align: top;
  padding-right: 32px;
}

#tdright {
  vertical-align: top;
  min-width: 280px;
}

/* --- Typography --- */
h2 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  margin: 0 0 30px 0;
  letter-spacing: -0.01em;
}

h3, h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}

h5, h6 {
  font-size: 0.95rem;
  color: #334155;
}

#headings {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  padding-bottom: 12px;
}

/* --- Labels --- */
#label {
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  color: #475569;
  padding: 10px 12px 10px 0;
  white-space: nowrap;
}

/* --- Input Fields --- */
input[type="text"],
input[type="TEXT"],
input[type="password"] {
  width: 100% !important;
  padding: 7px 12px !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  color: #1e293b;
  background: #ffffff;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="TEXT"]:focus,
input[type="password"]:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input[type="text"]:hover,
input[type="TEXT"]:hover,
input[type="password"]:hover {
  border-color: #94a3b8 !important;
}

/* --- Select / Dropdown --- */
select {
  padding: 7px 36px 7px 12px !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  color: #1e293b;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select:hover {
  border-color: #94a3b8 !important;
}

/* --- Buttons: replace image-based buttons with styled text --- */
.button-search,
.button-clear-query,
.button-clear,
.button-logon,
.button-cancel,
.button-register,
.button-select,
.button-clear-choices,
.button-show-selected-records,
.button-3dots {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background-image: none !important;
  background-color: #3b82f6 !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 10px 24px !important;
  height: auto !important;
  width: auto !important;
  min-width: 100px;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
}

/*
  Note: ::after doesn't work on <input> elements.
  Button text must come from the HTML value attribute.
  The CSS below sets fallback text-indent + font-size
  so the value text is visible even without background images.
*/

.button-search:hover,
.button-logon:hover,
.button-register:hover,
.button-select:hover,
.button-show-selected-records:hover {
  background-color: #2563eb !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.button-search:active,
.button-logon:active,
.button-register:active,
.button-select:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary buttons */
.button-clear-query,
.button-clear,
.button-cancel,
.button-clear-choices {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
}

.button-clear-query:hover,
.button-clear:hover,
.button-cancel:hover,
.button-clear-choices:hover {
  background-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* 3-dots / browse button */
.button-3dots {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
  min-width: 44px !important;
  padding: 10px 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
}

.button-3dots:hover {
  background-color: #cbd5e1 !important;
}

/* --- Small text --- */
#small-chars {
  font-size: 1rem !important;
  color: #003845;
  padding-left: 8px;
}

/* --- Cell alignment helpers --- */
#centre-cell {
  font-size: 0.875rem !important;
  text-align: center;
  padding: 8px 6px;
}

#left-cell {
  font-size: 0.875rem !important;
}

#right-cell {
  font-size: 0.875rem !important;
}

/* --- Error messages --- */
#errormsg {
  color: #dc2626;
  font-size: 0.9rem !important;
  font-weight: 500;
 /* padding: 8px 12px;
  background: #fef2f2;*/
  border-radius: 6px;
  border-left: 3px solid #dc2626;
}

/* --- Paragraphs inside page --- */
#page p {
  font-size: 0.9rem !important;
  color: #334155;
  margin: 12px 0;
  line-height: 1.65;
}

#page table p {
  font-size: 0.9rem !important;
}

/* --- Lists --- */
#page ul {
  float: none !important;
  display: block !important;
  padding: 0 0 16px 0;
  margin: 8px 0 8px 24px;
}

#page ul li {
  font-size: 0.9rem !important;
  color: #334155;
  margin-bottom: 6px;
  line-height: 1.6;
}

/* --- Links --- */
a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* --- Cards: wrap major sections in subtle cards --- */
#tdleft, #page > table > tbody > tr > #centre-cell {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

#tdright {
  background: transparent;
  border-radius: 12px;
  padding: 28px !important;
  box-shadow: none;
  border: none;
}

/* --- About section styling --- */
#page > table > tbody > tr:last-child > td {
  padding-top: 30px !important;
}

#page > table > tbody > tr:last-child > td > table {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

#page > table > tbody > tr:last-child > td > table td {
  padding: 30px !important;
}

/* --- Bold text refinement --- */
strong {
  font-weight: 600;
  color: #1e293b;
}

/* --- Responsive: stack on smaller screens --- */
@media (max-width: 768px) {
	#search-login-table > table > tbody > tr, #search-login-table  tbody  tr #tdleft form > table > tbody > tr, #search-login-table tbody  tr #tdleft form > table > tbody > tr > td >table > tbody > tr {
		display: flex;
		flex-direction: column;
	}
	#search-login-table tbody  tr #tdleft form > table > tbody > tr > td >table > tbody > tr input {
		width: 100% !important;
	}
	#search-login-table tbody  tr #tdleft form > table > tbody > tr > td {
		padding: 0;
		padding-bottom: 3px;
	}
	#search-login-table tbody  tr #tdleft {
		width: 100%;
		padding: 24px !important;
	}
	.pagewidth, .pagewidth #main-mid {padding: 0px !important}
	#page > table > tbody > tr:last-child > td {padding-top: 0 !important;}
	body {background:none !important;}
	#tdleft, #tdright {
      margin-bottom: 0;
    }	
}


@media (max-width: 900px) {
  .pagewidth {
    padding: 16px;
  }

  #main-mid,
  #main-mid-500,
  #main-mid-600 {
    padding: 16px !important;
  }

  #tdleft,
  #tdright {
    display: block !important;
    width: 100% !important;
    margin-bottom: 16px;
  }

  /* Force table rows to stack */
  #page > table > tbody > tr > td {
    display: block !important;
    width: 100% !important;
  }

}

/* --- Google Fonts import (Inter) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.button-search::before {
  content: "Search";
}

.button-clear-query::before {
  content: "Reset";
}

#subject-list #page > table > tbody > tr:last-child > td > table td, 
#subject-list #page >table > tbody > tr > td {
  padding:0 !important;
  box-shadow:none;
  border:0;
}
#subject-list #page h2 {margin: 0 0 10px 0 !important}
#subject-list #page > table > tbody > tr td form[name="keys"] {padding:30px !important;}
#subject-list #page > table > tbody > tr td form {padding: 0 30px 30px !important;}
#subject-list #page >table > tbody > tr > td select {background:#FFF !important; margin:10px 0 !important}
#subject-list #page input[type="text"] {width:auto !important}