:root {
  --bg: #eef2f5;
  --card: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e4e9f0;
  --soft: #f8fafc;
  --brand: #2f7df6;
  --brand-dark: #155bd6;
  --brand-soft: #eaf2ff;
  --danger: #dc2626;
  --ok: #16a34a;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.login-view {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-card,
.nav-card,
.page-header,
.panel,
.exam-card,
.stat-card,
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.login-card {
  max-width: 430px;
  padding: 32px;
  width: 100%;
}

.brand-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

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

h1 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 6px;
}

h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}

h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

p,
small {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 6px;
}

label,
.login-form {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #d7deea;
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.14);
  outline: 0;
}

button,
.button-link {
  align-items: center;
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: var(--brand-dark);
}

button.secondary,
.logout-button {
  background: #475569;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 168px minmax(0, 1fr) 296px;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 100vh;
  padding: 20px;
}

.sidebar {
  align-self: start;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 20px;
}

.nav-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.nav-item {
  border-radius: 8px;
  color: #374151;
  display: block;
  font-weight: 700;
  padding: 13px 12px;
}

.nav-item.active,
.nav-item:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.logout-button {
  width: 100%;
}

.main-content,
.right-panel {
  display: grid;
  gap: 14px;
}

.right-panel {
  align-self: start;
  position: sticky;
  top: 20px;
}

.page-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 62px;
  padding: 16px 18px;
}

.page-header p {
  margin: 4px 0 0;
}

.panel {
  padding: 18px;
}

.compact-panel {
  padding: 16px;
}

.section-head,
.task-top,
.calendar-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head.tight {
  margin-bottom: 10px;
}

.progress-pill,
.status-pill {
  background: var(--brand-soft);
  border-radius: 999px;
  color: var(--brand-dark);
  display: inline-flex;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.grid-2,
.resource-grid,
.course-grid,
.question-grid,
.material-grid,
.note-grid,
.exam-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-list,
.upcoming-plan,
.command-cards,
.sessions,
.list-stack {
  display: grid;
  gap: 10px;
}

.task-card,
.resource-box,
.command-card,
.session,
.upcoming-card,
.course-card,
.question-card,
.material-card,
.note-card,
.qa-card,
.exam-item {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.task-card.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.task-card p,
.session small,
.upcoming-card small,
.upcoming-card span {
  margin-bottom: 0;
}

.task-top strong,
.course-card strong,
.question-card strong,
.material-card strong,
.note-card strong,
.qa-card strong,
.exam-item strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.task-time {
  color: var(--brand-dark);
  font-weight: 900;
  white-space: nowrap;
}

.task-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.resource-box ul,
.clean-list {
  margin: 0;
  padding-left: 18px;
}

.resource-box li,
.clean-list li {
  margin-bottom: 6px;
  word-break: break-word;
}

.clock {
  color: var(--brand-dark);
  font-size: 32px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 2fr 1fr;
  margin-bottom: 10px;
}

.exam-card {
  background: linear-gradient(135deg, #ff6657, #ff9b63);
  color: #fff;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.exam-card p,
.exam-card span {
  color: rgba(255, 255, 255, 0.93);
  margin: 0;
}

.exam-card strong {
  font-size: 30px;
}

.calendar-head span {
  border: 1px solid #bcd5ff;
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
}

.calendar {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(7, 1fr);
}

.calendar span {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  height: 32px;
  justify-content: center;
}

.calendar .weekday {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-weight: 800;
}

.calendar .muted {
  color: #c0c6d0;
}

.calendar .today {
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.calendar .exam-day {
  border-color: #ff9b63;
  color: #d9480f;
  font-weight: 900;
}

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.stat-card,
.stats-grid article {
  background: var(--soft);
  border-radius: 8px;
  min-height: 72px;
  padding: 14px;
}

.stat-card span,
.stats-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.stat-card strong,
.stats-grid strong {
  display: block;
  font-size: 16px;
  margin-top: 8px;
}

.goal-control,
.manual-form,
.search-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.goal-control {
  align-items: center;
  display: flex;
}

.goal-control input {
  min-height: 32px;
  padding: 6px 8px;
  width: 72px;
}

.command-card {
  display: grid;
  gap: 6px;
}

.command-card code {
  background: #eef4ff;
  border-radius: 8px;
  color: #174ea6;
  display: block;
  padding: 9px;
  white-space: pre-wrap;
}

.progress-line {
  background: #e8eef7;
  border-radius: 999px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-line span {
  background: var(--brand);
  display: block;
  height: 100%;
}

.feature-card {
  padding: 14px;
}

.error {
  color: var(--danger);
  min-height: 20px;
}

.study-dashboard {
  display: grid;
  gap: 26px;
}

.dashboard-card,
.side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
  padding: 20px;
}

.layout.route-study-plan {
  gap: 30px;
  grid-template-columns: 190px minmax(0, 1fr) 318px;
  max-width: 1400px;
  padding: 28px 32px;
}

.route-study-plan .sidebar,
.route-study-plan .main-content,
.route-study-plan .right-panel {
  gap: 22px;
}

.route-study-plan .nav-card {
  border-radius: 16px;
  padding: 18px;
}

.route-study-plan .nav-item {
  border-radius: 12px;
  padding: 14px 14px;
}

.route-study-plan .dashboard-card {
  border-radius: 18px;
  padding: 28px;
}

.route-study-plan .side-card {
  border-radius: 16px;
  padding: 18px;
}

.overview-card {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 132px;
}

.overview-main h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.overview-main p {
  font-size: 14px;
  margin-bottom: 10px;
}

.overview-progress {
  background: #e8eef7;
  border-radius: 999px;
  height: 8px;
  max-width: 560px;
  overflow: hidden;
}

.overview-progress span {
  background: var(--brand);
  display: block;
  height: 100%;
}

.primary-action {
  border-radius: 12px;
  min-width: 104px;
  padding: 0 20px;
}

.secondary-action {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.secondary-action:hover {
  background: #dbeafe;
}

.text-action {
  background: transparent;
  color: var(--brand-dark);
  min-height: auto;
  padding: 0;
}

.text-action:hover {
  background: transparent;
  color: var(--brand);
}

.text-danger {
  background: transparent;
  color: var(--danger);
}

.text-danger:hover {
  background: transparent;
  color: #b91c1c;
}

.learning-block-card {
  display: grid;
  gap: 22px;
}

.learning-block-head {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.learning-block-head h2,
.focus-course-card h2,
.content-tabs-card h2,
.task-timeline-card h2,
.timer-lite-card h2,
.task-arrangement-card h2 {
  font-size: 17px;
  font-weight: 700;
}

.focus-list {
  border-top: 1px solid #edf1f6;
  padding-top: 14px;
}

.compact-focus-list {
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  padding: 18px 20px;
}

.focus-list > span,
.quiet-count {
  color: var(--muted);
  font-size: 13px;
}

.focus-list ol {
  color: #374151;
  font-size: 14px;
  line-height: 2;
  margin: 8px 0 0;
  padding-left: 20px;
}

.focus-list details {
  margin-top: 8px;
}

.focus-list summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tabs input {
  display: none;
}

.tab-labels {
  background: #f4f7fb;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
}

.tab-labels label {
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  min-width: 72px;
  padding: 7px 14px;
  place-content: center;
}

#tabVideos:checked ~ .tab-labels label[for="tabVideos"],
#tabCourseware:checked ~ .tab-labels label[for="tabCourseware"] {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.tab-panel {
  display: none;
}

#tabVideos:checked ~ .videos-panel,
#tabCourseware:checked ~ .courseware-panel {
  display: block;
}

.content-list {
  color: #374151;
  font-size: 14px;
  line-height: 2;
  margin: 0;
  padding-left: 18px;
}

.learning-tabs {
  border-top: 1px solid #edf1f6;
  padding-top: 20px;
}

.task-arrangement-card {
  display: grid;
  gap: 24px;
}

.task-timeline-inner {
  display: grid;
  gap: 4px;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 104px 18px minmax(0, 1fr);
  min-height: 96px;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  background: #dbe4f0;
  content: "";
  grid-column: 2;
  justify-self: center;
  position: absolute;
  top: 28px;
  bottom: -6px;
  width: 2px;
}

.timeline-time {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  padding-top: 3px;
}

.timeline-dot {
  background: #fff;
  border: 3px solid var(--brand);
  border-radius: 999px;
  height: 14px;
  margin-top: 4px;
  width: 14px;
  z-index: 1;
}

.timeline-body {
  border-bottom: 1px solid #edf1f6;
  padding: 0 0 18px 14px;
}

.timeline-title-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.timeline-title-row strong {
  font-size: 15px;
  font-weight: 700;
}

.timeline-body p {
  font-size: 13px;
  line-height: 1.7;
  margin: 6px 0 10px;
}

.task-status {
  background: #f1f5f9;
  border-radius: 999px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  white-space: nowrap;
}

.timeline-item.done .task-status {
  background: #dcfce7;
  color: #166534;
}

.timer-lite-card {
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  padding: 18px;
}

.timer-lite-form {
  grid-template-columns: minmax(0, 1.6fr) minmax(150px, 0.8fr);
}

.side-card {
  padding: 16px;
}

.exam-mini-card {
  background: #fff9f2;
  border-color: #fde6c8;
}

.exam-mini-card p {
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.exam-mini-card strong {
  color: #b45309;
  display: block;
  font-size: 19px;
  margin-bottom: 6px;
}

.exam-mini-card span,
.side-progress-row span {
  color: var(--muted);
  font-size: 13px;
}

.progress-side-card h2,
.quick-log-card h2,
.calendar-compact-card h2 {
  font-size: 17px;
}

.side-progress-row {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.side-progress-row strong {
  font-size: 14px;
}

.compact-calendar {
  gap: 5px;
}

.compact-calendar span {
  border-radius: 7px;
  font-size: 12px;
  height: 27px;
}

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

  .sidebar,
  .right-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .layout,
  .login-view {
    padding: 14px;
  }

  .page-header,
  .section-head,
  .task-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-2,
  .grid-3,
  .resource-grid,
  .course-grid,
  .question-grid,
  .material-grid,
  .note-grid,
  .exam-grid,
  .form-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .overview-card,
  .timeline-item,
  .timer-lite-form {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    gap: 8px;
  }

  .timeline-item::after,
  .timeline-dot {
    display: none;
  }

  .timeline-body {
    padding-left: 0;
  }
}
