:root {
  --navy: #10233f;
  --ink: #182235;
  --muted: #728096;
  --line: #e8edf3;
  --bg: #f6f8fb;
  --teal: #21a89a;
  --teal-dark: #138a7e;
  --amber: #f5aa39;
  --danger: #df5c69;
  --white: #fff;
  --shadow: 0 14px 40px rgba(16, 35, 63, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", system-ui, sans-serif;
  font-size: 15px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
.mono {
  font-family: "DM Mono", monospace;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #fff;
}
.brand-pane {
  background: var(--navy);
  color: #fff;
  padding: 50px max(7vw, 42px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.brand-pane:after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  right: -170px;
  bottom: -170px;
  box-shadow:
    0 0 0 55px rgba(255, 255, 255, 0.035),
    0 0 0 110px rgba(255, 255, 255, 0.025);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo img {
  display: block;
  width: 38px;
  height: 50px;
  object-fit: contain;
}
.logo span {
  color: #5de0d1;
}
.brand-pane .logo img {
  width: 48px;
  height: 64px;
}
.brand-pane h1 {
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1.14;
  letter-spacing: -1.8px;
  max-width: 600px;
  margin: auto 0 22px;
}
.brand-pane p {
  color: #c2cede;
  max-width: 470px;
  line-height: 1.8;
  font-size: 17px;
}
.feature-row {
  display: flex;
  gap: 26px;
  margin-top: 55px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d9e3ef;
  font-size: 14px;
}
.dot {
  width: 9px;
  height: 9px;
  background: #5de0d1;
  border-radius: 50%;
}
.login-box {
  padding: clamp(40px, 8vw, 115px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: min(100%, 425px);
}
.eyebrow {
  font-family: "DM Mono", monospace;
  color: var(--teal-dark);
  font-size: 12px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}
.login-card h2 {
  font-size: 33px;
  letter-spacing: -1px;
  margin: 12px 0 9px;
}
.login-card > p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 33px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  outline: none;
  transition: 0.2s;
}
.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(33, 168, 154, 0.12);
}
.primary {
  background: var(--teal);
  color: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 600;
  width: 100%;
  margin-top: 20px;
  transition: 0.2s;
}
.primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}
.login-note {
  font-size: 12px;
  color: #8d99aa;
  text-align: center;
  margin-top: 22px;
}
.admin-link {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.admin-link button {
  color: var(--teal-dark);
  background: none;
  font-weight: 700;
  padding: 0;
  margin-left: 4px;
}
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}
.sidebar {
  background: var(--navy);
  color: #c0cede;
  padding: 29px 16px;
  display: flex;
  flex-direction: column;
}
.sidebar .logo {
  padding: 0 13px;
  color: white;
}
.sidebar .logo img {
  width: 34px;
  height: 45px;
}
.sidebar .logo span {
  font-size: 17px;
}
.role {
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 1.1px;
  color: #75d9d0;
  margin: 38px 13px 13px;
}
.nav-btn {
  background: transparent;
  color: #c0cede;
  text-align: left;
  padding: 12px 13px;
  border-radius: 8px;
  margin: 2px 0;
  font-size: 14px;
}
.nav-btn.active,
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.nav-btn .nav-icon {
  width: 23px;
  display: inline-block;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 13px 4px;
  font-size: 12px;
  line-height: 1.55;
}
.sidebar-footer strong {
  color: #fff;
  font-size: 13px;
}
.workspace {
  padding: 28px clamp(25px, 4vw, 58px);
  max-width: 1500px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 35px;
}
.breadcrumbs {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  color: #8996a8;
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dcefeb;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
}
.user-role {
  font-size: 11px;
  color: var(--muted);
}
.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 25px;
}
.page-title h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -1px;
}
.page-title p {
  margin: 5px 0 0;
  color: var(--muted);
}
.outlined {
  padding: 10px 14px;
  background: white;
  border: 1px solid #dce3ec;
  color: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px;
  box-shadow: 0 3px 13px rgba(16, 35, 63, 0.025);
}
.stat-head {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-top: 10px;
}
.stat-trend {
  font-size: 12px;
  color: var(--teal-dark);
  margin-top: 5px;
}
.grid {
  display: grid;
  grid-template-columns: 1.42fr 0.88fr;
  gap: 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 3px 13px rgba(16, 35, 63, 0.025);
}
.panel h3 {
  font-size: 16px;
  margin: 0;
}
.panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 19px;
}
.exam-row {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.exam-row:last-child {
  border: 0;
  padding-bottom: 0;
}
.exam-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f0f6f7;
  color: var(--teal-dark);
}
.exam-title {
  font-size: 14px;
  font-weight: 600;
}
.exam-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.tag {
  margin-left: auto;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 20px;
  background: #edf9f7;
  color: var(--teal-dark);
  white-space: nowrap;
}
.tag.amber {
  background: #fff7e8;
  color: #bd7915;
}
.tag.gray {
  background: #f1f3f6;
  color: #718094;
}
.activity {
  display: flex;
  gap: 12px;
  margin: 15px 0;
}
.activity-dot {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 6px;
}
.activity p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.activity span {
  color: var(--muted);
  font-size: 11px;
}
.section-tabs {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}
.tab {
  background: transparent;
  padding: 0 0 11px;
  margin-right: 19px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--teal-dark);
  font-weight: 600;
  border-bottom-color: var(--teal);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #8996a8;
  font-weight: 600;
  padding: 0 12px 12px;
}
.table td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.student-id {
  font-family: "DM Mono", monospace;
  color: #6b788b;
  font-size: 11px;
}
.score {
  font-weight: 700;
}
.score.good {
  color: var(--teal-dark);
}
.score.mid {
  color: #c9821c;
}
.empty-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.filter {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  background: #fff;
}
.student-layout {
  max-width: 1100px;
  margin: auto;
}
.welcome {
  background: linear-gradient(115deg, #10233f, #1a3c61);
  color: white;
  padding: 28px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.welcome h1 {
  margin: 3px 0;
  font-size: 28px;
}
.welcome p {
  color: #c4d2e1;
  margin: 0;
}
.exam-card {
  border-left: 4px solid var(--teal);
}
.progress {
  height: 6px;
  background: #e7edf2;
  border-radius: 9px;
  overflow: hidden;
  margin: 16px 0 8px;
}
.progress i {
  display: block;
  background: var(--teal);
  height: 100%;
  border-radius: 9px;
}
.start {
  background: var(--navy);
  color: white;
  padding: 9px 13px;
  border-radius: 8px;
  margin-left: auto;
  font-size: 12px;
}
.exam-shell {
  max-width: 980px;
  margin: auto;
}
.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.timer {
  color: #c75b5d;
  background: #fff2f2;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: "DM Mono", monospace;
  font-size: 14px;
}
.question-layout {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 20px;
}
.question {
  font-size: 19px;
  line-height: 1.7;
  margin: 18px 0 26px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
  margin: 10px 0;
  font-size: 14px;
  transition: 0.15s;
}
.choice:hover,
.choice.selected {
  border-color: var(--teal);
  background: #f0fbf9;
}
.choice b {
  width: 25px;
  height: 25px;
  border: 1px solid #c9d3df;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}
.choice.selected b {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.qnav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 13px;
}
.qnav button {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #f0f3f6;
  color: #6f7d90;
  font-size: 11px;
}
.qnav button.current {
  background: var(--navy);
  color: #fff;
}
.qnav button.done {
  background: #daf1ed;
  color: var(--teal-dark);
}
.exam-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}
.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 13px;
}
.submit {
  background: var(--teal);
  color: #fff;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.hidden {
  display: none;
}
@media (max-width: 850px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .brand-pane {
    min-height: 340px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid,
  .question-layout {
    grid-template-columns: 1fr;
  }
  .question-layout aside {
    order: -1;
  }
  .workspace {
    padding: 23px;
  }
  .page-title {
    align-items: start;
    gap: 15px;
  }
  .welcome {
    align-items: start;
    gap: 15px;
    flex-direction: column;
  }
}
@media (max-width: 500px) {
  .login-box {
    padding: 42px 25px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .brand-pane {
    padding: 35px 27px;
  }
  .feature-row {
    gap: 14px;
    flex-wrap: wrap;
  }
  .table {
    font-size: 11px;
  }
  .table th:nth-child(4),
  .table td:nth-child(4) {
    display: none;
  }
}
