@import url('./selected-state.css');

:root {
  font-family: system-ui, 'Noto Sans CJK SC', sans-serif;
  color: #17303c;
  background: #f2f7f6;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 5vw;
  background: #123e4d;
  color: white;
}
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
header a {
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid #f6c453;
  outline-offset: 2px;
}
main {
  max-width: 1150px;
  margin: auto;
  padding: 2rem 1rem 5rem;
}
h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.25rem;
  margin: 0.1rem 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}
section {
  background: white;
  border: 1px solid #c8dcd9;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 3px 10px #123e4d0b;
}
label {
  display: block;
  margin: 0.75rem 0;
  font-weight: 600;
}
input {
  display: block;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #789b9c;
  border-radius: 6px;
  margin-top: 0.35rem;
  font: inherit;
}
button {
  font: inherit;
  background: #0a5b69;
  border: 0;
  border-radius: 6px;
  color: white;
  padding: 0.65rem 1rem;
  cursor: pointer;
  margin: 0.3rem 0.3rem 0.3rem 0;
}
button:hover {
  background: #074957;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.actions {
  display: flex;
  flex-wrap: wrap;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
td,
th {
  border-bottom: 1px solid #d3e3e0;
  padding: 0.4rem;
  text-align: left;
  word-break: break-all;
}
#result {
  white-space: pre-wrap;
  background: #e4efed;
  padding: 1rem;
  border-radius: 8px;
  min-height: 3rem;
  overflow-wrap: anywhere;
}
#session {
  font-weight: 600;
}
p {
  line-height: 1.6;
}

/* The host's fallback account panel belongs to the same reading column as main. */
.cloud-login {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  max-width: 1150px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  overflow-wrap: anywhere;
}
.cloud-login > * {
  min-width: 0;
  max-width: 100%;
}

/* Student entry follows reading order: login, registration, activation, reset. */
body[data-account-role='student'] .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 600px) {
  body[data-account-role='student'] .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
#account-shortcuts {
  margin-top: 2rem;
}

#account-shortcuts > a {
  display: inline-block;
  margin: 0.5rem 1rem 0 0;
}
.student-entry-actions {
  display: flex;
  gap: 1rem;
  margin-block: 1rem;
}
.student-entry-actions[hidden] {
  display: none;
}
.student-entry-actions a {
  flex: 1;
  padding: 1rem;
  text-align: center;
  color: white;
  background: #166534;
  border-radius: 0.4rem;
  font-size: 1.15rem;
}
.student-entry-simple header nav a:not([href='/auth/logout']) {
  display: none;
}

.student-entry-simple #result-title,
.student-entry-simple #result:empty {
  display: none;
}

/* Verified student selectors remain readable on both full and embedded pages. */
#revoke-access select[name='subjectRef'],
#issue-reset select[name='subjectRef'] {
  display: block;
  width: 100%;
  max-width: 36rem;
  min-height: 2.75rem;
  padding: 0.65rem;
  margin-top: 0.35rem;
  font: inherit;
}

/* JM: optional roster tools belong below the primary account panels. */
.grid > .account-secondary-tools {
  grid-column: 1 / -1;
}

/* Keep the automatically visible five-column admissions list within narrow screens. */
#admissions {
  max-width: 100%;
  overflow-x: auto;
}
#admissions table {
  min-width: 32rem;
}
