:root {
  --color-primary: #2c3531;
  --color-primary-dark: #1f2523;
  --color-primary-soft: rgba(44, 53, 49, 0.08);
  --color-accent: #b99470;
  --color-surface: #f7f4ef;
  --color-surface-elevated: #ffffff;
  --color-text: #1f2422;
  --color-muted: #5f6965;
  --color-border: rgba(44, 53, 49, 0.16);
  --shadow-lg: 0 24px 60px rgba(31, 37, 35, 0.16);
  --shadow-md: 0 12px 28px rgba(31, 37, 35, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-body: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(185, 148, 112, 0.16), transparent 36%),
    radial-gradient(circle at right center, rgba(44, 53, 49, 0.09), transparent 30%),
    linear-gradient(180deg, #fcfbf8 0%, var(--color-surface) 100%);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
}

.layout {
  width: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 20px 56px;
}

.content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding-left: 20px;
  box-sizing: border-box;
}

.main-top,
.main-middle,
.main-table {
  width: 100%;
}

.main-top p,
.main-middle p,
.main-table p {
  margin: 0;
}

.main-top h2,
.main-top h3 {
  margin: 0;
  text-align: center;
  color: #7a7a7a;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  background-color: var(--color-primary);
  color: white;
}

.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--color-primary);
}

.site-header .container,
.site-footer .container {
  width: 100%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site-header .container.is-head-admin {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.activeBigBtn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  color: #fff;
  text-decoration: none;
}

a.activePage {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  height: 24px;
  color: #fff;
  text-decoration: none;
}

.delete-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #b91c1c;
  text-decoration: none;
  font-size: 0.875rem;
}

.delete-link:hover {
  opacity: 0.7;
}

.header-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-row--primary {
  justify-content: space-between;
}

.header-row--secondary {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.header-row--secondary-indented {
  margin-left: 0;
}

.header-row--study-secretary {
  align-items: flex-start;
  justify-content: space-between;
}

.header-left-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.header-right-stack {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.admin-nav span {
  white-space: nowrap;
}

.admin-nav .header-nav-button {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.admin-nav a:hover,
.admin-nav .header-nav-button:hover,
.admin-nav .header-nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.site-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: white;
  letter-spacing: 0.02em;
}

.site-header a {
  display: inline-flex;
  align-items: center;
  color: white;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 8px;
}

.language-button {
  min-width: 40px;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.language-button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.language-button.is-active {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.user-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.user-name {
  margin: 0;
  line-height: 1;
}

.site-header form {
  margin: 0;
}

.site-header button,
.darkbutton,
.greybutton {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.site-header button {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 10px 20px rgba(44, 53, 49, 0.16);
}

.userbutton {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
}

.userbutton:hover,
.site-header button:hover,
.darkbutton:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.site-header button:focus-visible,
.darkbutton:focus-visible,
.greybutton:focus-visible,
.registerlink:focus-visible,
textarea:focus,
input:focus-visible {
  outline: 3px solid rgba(185, 148, 112, 0.35);
  outline-offset: 2px;
}

.login_container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-top p {
  color: #686868;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 20px;
  text-align: center;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--color-primary);
  padding: 54px 0;
}

.site-footer p {
  margin: 0;
  color: #fff;
  line-height: 1.6;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.footer-logo img {
  display: block;
  width: min(360px, 100%);
  height: auto;
}

.site-footer a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}

.site-footer a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

#pagearea {
  width: 100%;
}

.login-page-spacer {
  padding-top: 50px;
  width: 100%;
  display: flex;
  justify-content: center;
}

#login {
  width: min(100%, 640px);
  animation: fade-in-up 360ms ease-out both;
}

#boxdiv {
  width: 100%;
  position: relative;
  padding: 34px 28px 30px;
  border: 1px solid rgba(44, 53, 49, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#boxdiv::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(44, 53, 49, 0.08), transparent 70%);
  pointer-events: none;
}

#boxdiv h4 {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.login-heading {
  overflow: hidden;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.loginnotice {
  min-height: 28px;
  margin-bottom: 16px;
  color: var(--color-muted);
}

.loginnotice p,
.login-failed-message {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(185, 148, 112, 0.12);
  color: var(--color-primary-dark);
  border: 1px solid rgba(185, 148, 112, 0.18);
}

.login-failed-message {
  display: inline-block;
}

.login-modal-center {
  text-align: center;
}

.login-modal-field {
  padding: 22px 20px 0;
}

.registerlink {
  display: inline-block;
  padding: 0.3rem 0;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(44, 53, 49, 0.25);
  text-underline-offset: 0.18em;
}

.registerlink:hover {
  color: var(--color-primary-dark);
  text-decoration-color: var(--color-primary-dark);
}

.link-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.createaccount-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: rgba(44, 53, 49, 0.04);
  border: 1px solid rgba(44, 53, 49, 0.08);
  text-align: center;
}

.createaccount-copy h5 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.createaccount-link {
  font-size: 1rem;
}

hr {
  border: 0;
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, rgba(44, 53, 49, 0.22), transparent);
}

.hidden-login {
  margin-top: 18px;
  display: none;
}

.login-link-row {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.login-submit-wrap {
  height: 65px;
}

.login-submit-button {
  width: 100%;
  height: 50px;
}

.login-submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.register-form {
  display: grid;
  gap: 24px;
}

.register-section {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(44, 53, 49, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.register-section h5 {
  margin: 0;
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.register-grid {
  display: grid;
  gap: 14px;
}

.form-signin {
  display: grid;
  gap: 16px;
}

.form-group {
  margin-bottom: 0;
}

.login-field {
  display: grid;
  gap: 8px;
}

.logininput,
input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
  padding: 0.85rem 1rem;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.logininput::placeholder,
input::placeholder {
  color: #84908a;
}

.input:focus,
.select:focus,
.logininput:focus,
input:focus {
  border-color: rgba(44, 53, 49, 0.42);
  box-shadow: 0 0 0 4px rgba(44, 53, 49, 0.08);
}

.darkbutton,
.blue-login-button {
  width: 100%;
  min-height: 50px;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.blue-login-button {
  letter-spacing: 0.02em;
}

.greybutton {
  background: rgba(44, 53, 49, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(44, 53, 49, 0.12);
}

.greybutton:hover {
  background: rgba(44, 53, 49, 0.13);
  transform: translateY(-1px);
}

.modal-content {
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-body,
.modal-footer {
  padding: 1.1rem 1.25rem;
}

.modal-body {
  background: linear-gradient(180deg, #fff, #fbfaf8);
}

.modal-footer {
  background: rgba(44, 53, 49, 0.03);
  border-top: 1px solid rgba(44, 53, 49, 0.08);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-footer .greybutton,
.modal-footer .darkbutton {
  width: auto;
  min-width: 110px;
}

.modalerrortext {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(178, 63, 63, 0.1);
  border: 1px solid rgba(178, 63, 63, 0.16);
  color: #8a2f2f;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container::after {
  content: "";
  display: block;
  clear: both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.table {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.tr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
}

.table .tr-w4 {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.thead .tr {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.tbody .tr {
  border-bottom: 1px solid #eef2f7;
}

.tbody .tr:last-child {
  border-bottom: 0;
}

.cell {
  padding: 12px 14px;
  min-width: 0;
}

.cell a {
  color: inherit;
  text-decoration: none;
}

.cell a:hover {
  text-decoration: underline;
}

/* Header buttons */
.header {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 600;
  background: #2c3531;
  color: #fff;
  border: 0;
  padding: 12px 14px;
  cursor: pointer;
}

/* Sort indicator */
.header::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  opacity: 0.35;
  vertical-align: middle;
}

.header[aria-sort="ascending"]::after {
  border-bottom: 7px solid currentColor;
  opacity: 0.8;
}

.header[aria-sort="descending"]::after {
  border-top: 7px solid currentColor;
  opacity: 0.8;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Create / edit forms */

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: block;
  margin: 1.5rem 0;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

input,
.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d5de;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
}

.psySelect {
  min-width: 160px;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(44, 53, 49, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 400;
}

.psyButton {
  min-width: 160px;
  padding: 0.9rem 1.4rem;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

textarea {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px;
  border: 1px solid #d0d5de;
  overflow-y: auto;
  overflow-x: hidden;
}

.button:hover {
  background: #e6dbb0;
}

.errorlist {
  background: #d30d44 !important;
  color: white;
  padding: 10px !important;
  border-radius: 0 !important;
  position: relative;
  display: inline-block !important;
  box-shadow: 1px 1px 1px #aaaaaa;
  margin-top: 10px;
  list-style-image: none;
}

.errorlist li:before {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #c51244;
  position: absolute;
  top: -10px;
}

.errorlist li:after {
  color: #c51244 !important;
}


.search-students{
      display: grid;
      gap: 1rem;
      max-width: 60rem;
      padding: 0 0 2rem;
      box-sizing: border-box;
  }

.search-students__help {
    margin: 0;
    color: rgba(0, 0, 0, 0.75);
}

.student-search {
    position: relative;
    display: grid;
    gap: 0.5rem;
    max-width: 34rem;
}

.student-search input[type="text"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(15, 50, 44, 0.78);
    /* background: rgba(10, 14, 24, 0.88); */
    background: #fff;
    color: rgba(7, 10, 18, 0.98);
    box-sizing: border-box;
}

.student-search__menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 10;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* background: rgba(7, 10, 18, 0.98); */
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.student-search__menu[hidden] {
    display: none;
}

.student-search__option {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0.85rem 1rem;
    cursor: pointer;
    display: grid;
    gap: 0.15rem;
    color: #081018;
}

.student-search__option:hover,
.student-search__option:focus-visible {
    background: rgba(13, 30, 27, 0.08);
    outline: none;
}

.student-search__option strong {
    font-weight: 650;
}

.student-search__option small {
    color: rgba(7, 10, 18, 0.66);
}

.student-search__details {
    display: grid;
    gap: 0.75rem;
    max-width: 40rem;
}

.student-search__empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.student-search__card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 50, 44, 0.18);
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    gap: 0.25rem;
}

.student-search__card-title {
    font-weight: 650;
    color: rgba(7, 10, 18, 0.98);
}

.student-search__card-meta {
    color: rgba(7, 10, 18, 0.7);
    font-size: 0.95rem;
}

.student-search__card-label {
    color: rgba(7, 10, 18, 0.58);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


@media (max-width: 768px) {
  .layout {
    align-items: stretch;
    padding: 16px 12px 24px;
  }

  .content {
    max-width: 100%;
  }

  .site-header .container,
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .container.is-head-admin {
    gap: 12px;
  }

  .header-row,
  .header-row--primary,
  .header-row--study-secretary {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .header-left-stack,
  .header-right-stack,
  .user-area {
    width: 100%;
  }

  .header-right-stack {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    margin-left: 0;
  }

  .header-row--secondary,
  .header-row--secondary-indented {
    padding-top: 0;
    border-top: 0;
    margin-left: 0;
  }

  .admin-nav {
    gap: 10px 14px;
  }

  .language-switcher {
    margin-left: 0;
    margin-right: 0;
  }

  .user-area {
    flex-wrap: wrap;
  }

  .user {
    min-width: 0;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .footer-logo img {
    width: min(240px, 100%);
  }

  #boxdiv {
    padding: 22px 16px 18px;
    border-radius: 18px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .greybutton,
  .modal-footer .darkbutton {
    width: 100%;
  }
}

.main-page {
  box-sizing: border-box;
}

div.tbody>div:nth-of-type(odd) {
  background: #b1b1b14a;
}

@media (max-width: 768px) {
  .table {
    border-radius: 12px;
  }

  .table .thead {
    display: none;
  }

  .sessions-table .sessions-head {
    display: none;
  }

  .table .tr,
  .sessions-row {
    grid-template-columns: 1fr !important;
  }

  .table .cell,
  .sessions-cell {
    display: block;
    padding: 0.8rem 1rem;
    border-top: 1px solid #eef2f7;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table .tbody .tr:first-child .cell,
  .sessions-table .sessions-body .sessions-row:first-child .sessions-cell {
    border-top: 0;
  }

  .table .cell::before,
  .sessions-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
  }

  .table .cell[data-label=""]::before,
  .sessions-cell[data-label=""]::before {
    display: none;
  }

  .table .cell a,
  .sessions-cell a {
    display: inline;
  }
}

ul.experiments-links {
  padding-left: 0px;
}

ul.experiments-links>li {
  list-style-type: none;
  margin-bottom: .5rem;
}

.site-header span a:hover {
  text-decoration: underline;
}

.no-bottom {
  margin-bottom: 0;
}
