.level-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}
.level-card,
.lesson-card,
.persona-card,
.case-card,
.rail-card,
.panel,
.stat-card,
.path-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.level-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 16px 12px;
  text-align: center;
}
.level-icon,
.persona-avatar,
.prompt-icon,
.cert-medal,
.level-badge {
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 14px;
  background: #eef1ff;
  color: var(--primary);
  font-weight: 900;
}
.level-icon {
  width: 54px;
  height: 54px;
  font-size: 24px;
}
.level-card strong {
  font-size: 13px;
}
.level-card small {
  color: var(--muted);
  font-size: 12px;
}
.lesson-row,
.persona-row,
.case-row {
  display: grid;
  gap: 14px;
}
.lesson-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.persona-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.case-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lesson-card,
.persona-card,
.case-card {
  overflow: hidden;
}
.lesson-card {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
}
.lesson-thumb,
.case-thumb {
  position: relative;
  display: grid;
  place-items: end start;
  min-height: 110px;
  padding: 12px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #15285d, #5b63ff);
}
.lesson-thumb::after,
.case-thumb::after {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(112, 123, 255, 0.1));
  transform: rotate(18deg);
}
.duration,
.case-tag {
  position: relative;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(5, 12, 30, 0.72);
  font-size: 12px;
  font-weight: 800;
}
.lesson-card h3,
.case-card h3,
.persona-card h3 {
  margin: 0;
  padding: 0 14px;
  font-size: 15px;
  line-height: 1.35;
}
.lesson-meta,
.persona-card p,
.case-card p {
  margin: 0;
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.persona-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 18px 8px;
  text-align: center;
}
.persona-avatar {
  width: 58px;
  height: 58px;
  font-size: 28px;
}
.case-card {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
}
.case-thumb {
  min-height: 116px;
}
.cta-panel {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #101b49, #4732d7 88%);
  color: #ffffff;
  box-shadow: var(--shadow);
}
.cta-panel p {
  max-width: 430px;
  color: #cbd7ff;
}
.cta-panel::after {
  content: "A1";
  position: absolute;
  right: 76px;
  top: 34px;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 36px;
  font-weight: 900;
}
.bottom-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}
.stat-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.stat-card strong,
.stat-card small {
  display: block;
}
.stat-card strong {
  color: var(--primary);
  font-size: 17px;
}
.stat-card small {
  color: var(--muted);
  font-size: 12px;
}
.rail-card {
  padding: 18px;
}
.rail-card h3 {
  margin: 0 0 14px;
}
.progress-ring {
  --p: 18;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 12px auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), #ececff 0);
}
.progress-ring > div {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #ffffff;
  text-align: center;
}
.progress-ring strong {
  display: block;
  font-size: 30px;
}
.mentor-bot {
  display: grid;
  place-items: center;
  width: 138px;
  height: 116px;
  margin: 8px auto 12px;
  border-radius: 48% 48% 42% 42%;
  background: radial-gradient(circle at 50% 38%, #1a3c6c, #d9e5ff 39%, #f8fbff 40%);
  color: #8df0ff;
  font-size: 38px;
  box-shadow: inset 0 -14px 28px rgba(99, 88, 247, 0.18);
}
.quick-pills {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.quick-pills button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}
.prompt-list,
.cert-list {
  display: grid;
  gap: 12px;
}
.prompt-item,
.cert-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.prompt-icon,
.cert-medal {
  width: 44px;
  height: 44px;
}
.cert-medal.done {
  background: #fff4da;
  color: #e2a018;
}
.cert-medal.locked {
  background: #eef0f6;
  color: #a4abc1;
}
.panel {
  padding: 22px;
}
.hero-grid,
.dashboard-grid,
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 20px;
}
.form-grid,
.path-list,
.lesson-body,
.content-list,
.score-list {
  display: grid;
  gap: 14px;
}
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--ink);
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.chips,
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip,
.tool-tab {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #e6e8fb;
  border-radius: 999px;
  background: #f4f6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.tool-tab.active {
  background: var(--primary);
  color: #ffffff;
}
.path-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}
.level-badge {
  width: 58px;
  height: 58px;
}
.card-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.quiz-option {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.result-box,
.code-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9ff;
  white-space: pre-wrap;
}
.score-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  background: var(--panel-soft);
  font-size: 13px;
}
.warning { color: var(--danger); font-weight: 800; }
.ok { color: var(--green); font-weight: 800; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #0c1736;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.real-dashboard {
  align-items: start;
}
.today-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  min-height: 318px;
  background:
    linear-gradient(135deg, rgba(37, 47, 143, 0.96) 0%, rgba(19, 32, 90, 0.98) 48%, rgba(91, 63, 242, 0.94) 100%);
}
.today-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 14px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ecf4ff;
  font-size: 12px;
  font-weight: 900;
}
.today-summary-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 22px 50px rgba(0, 0, 0, 0.18);
}
.today-summary-card strong {
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
}
.today-summary-card span,
.today-summary-card small {
  color: #dce5ff;
  line-height: 1.45;
}
.today-summary-card .progress-bar {
  background: rgba(255, 255, 255, 0.2);
}
.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.role-reco-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.role-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 142px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
}
.role-card span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f0f3ff;
  color: var(--primary);
  font-weight: 900;
}
.role-card strong {
  line-height: 1.28;
}
.role-card small {
  color: var(--muted);
  line-height: 1.45;
}
.role-card.active {
  border-color: rgba(98, 88, 247, 0.52);
  background: linear-gradient(180deg, #ffffff 0%, #f6f7ff 100%);
  box-shadow: 0 16px 34px rgba(98, 88, 247, 0.14);
}
.role-card.active span {
  background: var(--primary);
  color: #ffffff;
}
.prompt-reco-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-prompt-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}
.dashboard-prompt-card h3,
.dashboard-prompt-card p {
  margin: 0;
}
.dashboard-prompt-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.dashboard-prompt-card > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
.check-mini-list {
  display: grid;
  gap: 10px;
}
.check-mini-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
}
.check-mini-item label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  min-width: 0;
  color: #354063;
  font-size: 13px;
  line-height: 1.45;
}
.check-mini-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
}
.check-mini-item.done span {
  color: var(--muted);
  text-decoration: line-through;
}
.check-mini-item .link-button {
  white-space: nowrap;
  font-size: 12px;
}
@media (max-width: 1180px) {
  .today-hero {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .role-reco-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .prompt-reco-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .today-hero,
  .dashboard-summary-grid,
  .role-reco-grid,
  .prompt-reco-grid {
    grid-template-columns: 1fr;
  }
  .today-summary-card {
    padding: 16px;
  }
  .role-card {
    min-height: 0;
  }
  .check-mini-item {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .level-grid,
  .lesson-row,
  .case-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .persona-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 280px;
    transform: translateX(-100%);
    transition: 0.2s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .topbar-actions {
    display: none;
  }
  .menu-button {
    display: inline-grid;
    place-items: center;
  }
  .hero-grid,
  .dashboard-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  #app,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .search-box kbd,
  .ai-visual {
    display: none;
  }
  .hero-panel {
    min-height: 0;
    padding: 28px 22px;
  }
  .hero-panel h1 {
    max-width: 320px;
    font-size: 27px;
    line-height: 1.16;
    overflow-wrap: break-word;
  }
  .hero-panel p,
  .hero-progress {
    max-width: 320px;
  }
  .section-title {
    align-items: start;
    flex-direction: column;
  }
  .level-grid,
  .lesson-row,
  .persona-row,
  .case-row,
  .right-rail,
  .bottom-stats,
  .card-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .path-row {
    grid-template-columns: 1fr;
  }
}



