:root {
  --jade: #087d68;
  --jade2: #0aa382;
  --ink: #172033;
  --muted: #6d7890;
  --line: #dfe7e5;
  --bg: #f2f7f6;
  --card: #fff;
  --gold: #efa824;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, "Noto Sans Thai", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
.hidden {
  display: none !important;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, #064e45cc, #16a08599),
    radial-gradient(circle, #fff, #b8d8d1);
}
.login-card {
  width: min(620px, 100%);
  padding: 48px 58px;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 24px 70px #052d2744;
}
.logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--jade), var(--jade2));
  color: #fff;
  font-size: 44px;
  font-weight: 900;
}
.login .logo {
  margin: auto;
}
.eyebrow {
  color: var(--jade);
  font-weight: 900;
  letter-spacing: 1.5px;
}
.login h1 {
  text-align: center;
  font-size: 38px;
  margin: 8px 0;
}
.login p {
  text-align: center;
  color: var(--muted);
}
label {
  font-weight: 800;
  display: block;
  margin: 18px 0 7px;
}
input,
select,
textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.primary {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--jade), var(--jade2));
  font-weight: 900;
  cursor: pointer;
}
.wide {
  width: 100%;
  margin-top: 22px;
}
.app {
  display: grid;
  grid-template-columns: 285px 1fr;
  min-height: 100vh;
}
aside {
  height: 100vh;
  position: sticky;
  top: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 15px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 20px;
  border-bottom: 1px solid var(--line);
}
.logo.small {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 25px;
}
.brand small,
.profile small {
  display: block;
  color: var(--muted);
}
nav {
  padding: 16px 0;
  flex: 1;
}
nav button {
  display: flex;
  gap: 12px;
  width: 100%;
  border: 0;
  background: none;
  border-radius: 13px;
  padding: 13px 14px;
  margin: 3px 0;
  color: #526174;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
nav button.active {
  color: var(--jade);
  background: #e8f7f3;
}
.profile {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dff6ef;
  color: var(--jade);
  font-weight: 900;
}
.profile button {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}
main {
  padding: 30px 38px;
  min-width: 0;
}
header h2 {
  font-size: 31px;
  margin: 4px 0 24px;
}
.hero {
  padding: 28px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(125deg, #07584c, #0ca586);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero h3 {
  font-size: 29px;
  margin: 5px 0;
}
.hero p {
  margin: 0;
  opacity: 0.9;
}
.hero strong {
  font-size: 43px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 20px;
  box-shadow: 0 7px 20px #163a3210;
}
.stat b {
  display: block;
  color: var(--jade);
  font-size: 29px;
}
.stat span,
.muted {
  color: var(--muted);
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.lesson-card {
  position: relative;
  overflow: hidden;
}
.lesson-card.locked {
  opacity: 0.55;
}
.lesson-no {
  color: var(--jade);
  font-weight: 900;
}
.lesson-card h3 {
  font-size: 20px;
  margin: 7px 0;
}
.lesson-card button,
.soft {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 10px 13px;
  cursor: pointer;
}
.lesson-card button {
  width: 100%;
  margin-top: 12px;
  color: var(--jade);
  font-weight: 900;
}
.progress {
  height: 9px;
  background: #e8efed;
  border-radius: 20px;
  overflow: hidden;
  margin: 11px 0;
}
.progress i {
  height: 100%;
  display: block;
  background: var(--jade2);
}
.lesson-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.word {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.word h3 {
  font-size: 29px;
  margin: 0;
}
.word button {
  border: 0;
  background: #e7f6f2;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
}
.pattern {
  border-left: 5px solid var(--jade);
  font-size: 23px;
  line-height: 1.7;
}
.practice-option {
  width: 100%;
  text-align: left;
  margin: 6px 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 13px;
  cursor: pointer;
}
.practice-option.correct {
  background: #e4f8ef;
  border-color: #37a679;
}
.practice-option.wrong {
  background: #fff0f0;
  border-color: #d95a5a;
}
.mission {
  background: #fff8e5;
  border-color: #f1d488;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 16px;
}
.table-wrap {
  overflow: auto;
}
.table {
  border-collapse: collapse;
  width: 100%;
}
.table th,
.table td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.score {
  font-size: 60px;
  color: var(--jade);
  font-weight: 950;
  text-align: center;
}
.feedback {
  padding: 12px;
  border-radius: 11px;
  background: #fff0f0;
  color: #9f2020;
  margin-top: 12px;
}
.lesson-summary {
  margin-bottom: 18px;
}
.lesson-summary li {
  margin: 7px 0;
}
.lesson-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lesson-toolbar input {
  max-width: 360px;
}
.word-tag {
  display: inline-block;
  font-size: 12px;
  background: #f3f4f6;
  color: #667085;
  border-radius: 999px;
  padding: 3px 8px;
}
.core-word {
  border-color: #80c9bb;
}
.core-word .word-tag {
  background: #e7f6f2;
  color: var(--jade);
}
.pattern-text {
  font-size: 20px;
}
.dialogue {
  margin: 18px 0;
}
.dialogue-line {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dialogue-line:last-child {
  border-bottom: 0;
}
.dialogue-line div {
  display: grid;
  gap: 3px;
}
.dialogue-line small,
.dialogue-line span {
  display: block;
}
.dialogue-line small {
  color: var(--jade);
}
.sound-mini {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.skill b {
  font-size: 18px;
}
.status {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
}
.status.active {
  background: #e8f7ee;
  color: #16794a;
}
.status.suspended {
  background: #fff0ee;
  color: #a62920;
}
@media (max-width: 1000px) {
  .app {
    grid-template-columns: 1fr;
  }
  aside {
    height: auto;
    position: static;
  }
  .brand,
  .profile {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    padding: 0;
  }
  nav button {
    min-width: 170px;
  }
  .lesson-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    padding: 20px;
  }
  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lesson-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .lesson-toolbar input {
    max-width: none;
  }
}
@media (max-width: 650px) {
  .login-card {
    padding: 32px 22px;
  }
  .stats,
  .lesson-grid,
  .vocab-grid {
    grid-template-columns: 1fr;
  }
  .skill-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    display: block;
  }
  .lesson-head {
    align-items: flex-start;
  }
  .actions {
    flex-wrap: wrap;
  }
}
