:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #17202c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #102027;
  color: #ffffff;
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #0f766e;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #b7c4c8;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 38px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  background: transparent;
  color: #d6e1e5;
  text-align: left;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover {
  background: #1c343d;
  color: #ffffff;
}

.content {
  padding: 32px;
}

.topbar,
.welcome {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid #d8dee6;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.status,
.ghost-button,
.primary-button {
  border-radius: 6px;
  font-weight: 800;
}

.status {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid #b8c2cc;
  background: #ffffff;
  font-size: 0.92rem;
}

.status.ok {
  color: #0f766e;
  border-color: #5eead4;
}

.status.error,
.form-message.error {
  color: #b42318;
}

.form-message.ok {
  color: #0f766e;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 1px solid transparent;
  padding: 0 16px;
  cursor: pointer;
}

.primary-button {
  background: #0f766e;
  color: #ffffff;
}

.ghost-button {
  background: #ffffff;
  color: #17202c;
  border-color: #ccd4dd;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  padding-top: 28px;
}

.intro,
.auth-panel,
.stats article,
.work-item {
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.intro {
  min-height: 440px;
  padding: 30px;
}

.intro p {
  max-width: 620px;
  color: #4b5b6c;
  line-height: 1.6;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.flow span {
  border: 1px solid #b7c4c8;
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 800;
}

.auth-panel {
  padding: 18px;
  align-self: start;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  border: 1px solid #ccd4dd;
  border-radius: 6px;
  min-height: 40px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.tab.active {
  background: #102027;
  color: #ffffff;
}

.form {
  display: grid;
  gap: 13px;
}

.compact-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #344456;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ccd4dd;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
}

input:focus,
select:focus {
  outline: 3px solid #c9f5ef;
  border-color: #0f766e;
}

.check-row {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  color: #17202c;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: #344456;
  font-weight: 700;
}

.dashboard {
  padding-top: 28px;
}

.welcome {
  padding: 28px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.welcome h2 {
  margin-bottom: 8px;
}

.welcome p:last-child {
  margin-bottom: 0;
  color: #4b5b6c;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stats article {
  padding: 18px;
}

.stats strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: #4b5b6c;
  font-weight: 800;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.work-item {
  min-height: 170px;
  padding: 20px;
}

.work-item p {
  color: #4b5b6c;
  line-height: 1.55;
}

.courses-list,
.evaluations-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.course-row,
.evaluation-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background: #f9fafb;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-button {
  min-height: 34px;
  border: 1px solid #ccd4dd;
  border-radius: 6px;
  padding: 0 10px;
  background: #ffffff;
  color: #102027;
  cursor: pointer;
  font-weight: 800;
}

.mini-button:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.course-row strong,
.course-row span,
.evaluation-row strong,
.evaluation-row span {
  display: block;
}

.course-row span,
.course-row small,
.evaluation-row span,
.evaluation-row small,
.empty-state {
  color: #4b5b6c;
}

.course-row small,
.evaluation-row small {
  font-weight: 800;
}

.empty-state {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed #b8c2cc;
  border-radius: 6px;
}

.evaluation-section {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 18px;
}

.evaluation-form-panel,
.evaluations-panel {
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.evaluation-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.evaluation-form label:first-child,
.evaluation-form button {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .auth-layout,
  .stats,
  .work-grid,
  .evaluation-section,
  .evaluation-form {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 20px;
  }

  .topbar,
  .welcome {
    flex-direction: column;
  }
}
