:root {
  --ink: #201333;
  --muted: #75657f;
  --line: #eadfee;
  --soft: #fff3f4;
  --panel: #ffffff;
  --purple: #7a4dff;
  --purple-2: #f1edff;
  --blue: #3f236e;
  --green: #18b977;
  --orange: #ff7a2f;
  --red: #ff5470;
  --shadow: 0 12px 28px rgba(104, 55, 155, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fff8f8 0%, #fff0f1 48%, #fff6f8 100%);
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid #f3ddd7;
  background:
    linear-gradient(180deg, #fff 0, #fff1f2 48%, #fff7fb 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 10px 0 30px rgba(255, 114, 94, .04);
}

.side-brand,
.top-brand {
  height: 46px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 82, 64, .13), rgba(255, 185, 91, .12), rgba(122, 77, 255, .08));
  text-align: left;
  cursor: pointer;
}

.side-brand:hover,
.top-brand:hover {
  background: linear-gradient(135deg, rgba(255, 122, 47, .16), rgba(122, 77, 255, .14));
}

.top-brand {
  width: 190px;
  justify-self: center;
  justify-content: center;
}

.company-logo-card {
  width: 100%;
  height: 58px;
  padding: 10px 14px;
  border: 0;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .48), transparent 34%),
    linear-gradient(135deg, #ffe7e7 0%, #ffc8cc 58%, #ffe7ee 100%);
  box-shadow:
    0 12px 24px rgba(255, 82, 64, .11),
    inset 0 1px 0 rgba(255, 255, 255, .72);
}

.company-logo-card:hover {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, .52), transparent 34%),
    linear-gradient(135deg, #ffdddd 0%, #ffbbc2 58%, #ffe1ea 100%);
  box-shadow:
    0 16px 28px rgba(255, 82, 64, .14),
    inset 0 1px 0 rgba(255, 255, 255, .76);
}

.company-logo-card img {
  width: 150px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(20, 12, 24, .08));
}

.brand-flash {
  color: #ff8a18;
  font-size: 20px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-btn {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f5570;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.side-nav-btn span {
  width: 20px;
  color: #7d7290;
}

.side-nav-btn.active,
.side-nav-btn:hover {
  color: #f05b3f;
  background: linear-gradient(90deg, #fff0ec, #f6efff);
}

.side-nav-btn.active span {
  color: #f05b3f;
}

.side-nav-btn.nav-disabled {
  background: #6f6874;
  color: #f2edf4;
  cursor: not-allowed;
  opacity: 1;
  position: relative;
}

.side-nav-btn.nav-disabled:hover {
  background: #6f6874;
  color: #f2edf4;
}

.side-nav-btn.nav-disabled span { color: inherit; }

.nav-disabled-mark {
  align-items: center;
  background: #332d36;
  border-radius: 50%;
  bottom: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 8px;
  width: 18px;
}

.save-config-btn {
  height: 42px;
  margin-top: auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff725e, #8757ff);
  box-shadow: 0 12px 22px rgba(255, 114, 94, .22);
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.save-config-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.20), transparent);
  pointer-events: none;
}

.save-config-btn.saving {
  opacity: .82;
}

.save-config-btn.saved {
  background: linear-gradient(135deg, #18b977, #5fce97);
}

.save-config-btn.error {
  background: linear-gradient(135deg, #ff5470, #ff7a2f);
}

.sidebar-empty-mascot {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 4px 6px 0;
}

.mascot-bubble {
  position: relative;
  max-width: 170px;
  padding: 9px 13px;
  border: 1px solid #ffd3c3;
  border-radius: 999px;
  color: #df3f2f;
  background: #fffaf6;
  box-shadow: 0 10px 18px rgba(255, 114, 94, .10);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.mascot-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #ffd3c3;
  border-bottom: 1px solid #ffd3c3;
  background: #fffaf6;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
}

.sidebar-empty-mascot img {
  width: min(136px, 92%);
  max-height: 220px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 18px rgba(255, 82, 64, .18));
}

.app-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid #f3ddd7;
  background:
    linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,245,247,.94));
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.top-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-tab {
  height: 58px;
  border-bottom: 2px solid transparent;
  color: #7a6f84;
  background: transparent;
  font-weight: 900;
}

.top-tab.active {
  color: #f05b3f;
  border-bottom-color: #f05b3f;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5f5570;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #f3ddd7;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff8f4;
  border: 1px solid #f0d7d0;
}

.avatar {
  color: #fff;
  background: linear-gradient(135deg, #ff725e, #8757ff);
  border: 0;
  font-weight: 900;
}

.top-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.top-user-meta strong {
  color: #20152e;
  font-size: 13px;
  font-weight: 900;
}

.top-user-meta small {
  color: #8a7b91;
  font-size: 11px;
  font-weight: 800;
}

.logout-button {
  height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #ff5b4d;
  background: #fff0ee;
  font-weight: 900;
  cursor: pointer;
}

.logout-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff7660, #9a57f6);
}

.page {
  width: min(1120px, calc(100% - 56px));
  margin: 24px auto 40px;
}

.home-dashboard {
  display: grid;
  gap: 18px;
  padding: 4px 0 28px;
}

.home-banner {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 28px 34px;
  border-radius: 18px;
  background: #fff5ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 34px rgba(255, 114, 94, .12);
}

.home-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.78) 38%, rgba(255,245,236,.12) 58%, rgba(255,245,236,0) 100%),
    url("./assets/training-growth-banner-wide.png") right center / 100% 100% no-repeat;
  opacity: 1;
  pointer-events: none;
}

.home-banner > div:first-child {
  position: relative;
  z-index: 1;
}

.home-banner h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.home-banner p {
  margin: 0;
  color: var(--muted);
}

.trophy {
  position: absolute;
  z-index: 1;
  right: 360px;
  top: 50%;
  transform: translateY(-50%);
  width: 92px;
  height: 82px;
  display: grid;
  place-items: center;
  font-size: 58px;
  filter: drop-shadow(0 14px 18px rgba(255, 122, 47, .24));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 154px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 10px 24px rgba(104, 55, 155, .08);
}

.feature-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 146, 128, .58);
  box-shadow: 0 16px 30px rgba(104, 55, 155, .12);
}

.feature-card.feature-disabled {
  background: #6f6874;
  border-color: #625b66;
  box-shadow: none;
  color: #f2edf4;
  cursor: not-allowed;
  opacity: 1;
  position: relative;
}

.feature-card.feature-disabled:hover {
  background: #6f6874;
  border-color: #625b66;
  box-shadow: none;
  transform: none;
}

.feature-card.feature-disabled h4,
.feature-card.feature-disabled p { color: inherit; }

.feature-card.feature-disabled .feature-icon {
  background: #5d5760;
  color: #f2edf4;
}

.feature-disabled-mark {
  align-items: center;
  background: #332d36;
  border-radius: 50%;
  bottom: 12px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 12px;
  width: 24px;
}

.feature-icon {
  position: relative;
  overflow: hidden;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #e94a43;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .96) 0 18%, transparent 19%),
    linear-gradient(145deg, #fff8f6 0%, #ffe8e7 58%, #f3ecff 100%);
  border: 1px solid rgba(255, 178, 169, .78);
  font-weight: 900;
  font-size: 18px;
  box-shadow:
    0 12px 18px rgba(255, 99, 82, .12),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.feature-icon::before {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 82, 64, .16);
}

.feature-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .74);
  pointer-events: none;
}

.feature-icon span {
  position: relative;
  z-index: 1;
  line-height: 1;
  text-shadow: none;
}

.feature-icon-default-practice {
  color: #ef5a3d;
  background: linear-gradient(145deg, #fff7ef 0%, #ffe5d8 60%, #fff3ee 100%);
}

.feature-icon-knowledge {
  color: #8c5bf1;
  background: linear-gradient(145deg, #fff7fb 0%, #f2eaff 62%, #fff1f6 100%);
}

.feature-icon-challenge-start {
  color: #e94a43;
  background: linear-gradient(145deg, #fff6f3 0%, #ffdfe3 58%, #f4ecff 100%);
}

.feature-icon-call {
  color: #0f9f70;
  background: linear-gradient(145deg, #f0fff8 0%, #dff8ef 58%, #fff2e9 100%);
}

.feature-icon-daily {
  color: #b04cf0;
  background: linear-gradient(145deg, #fff7ff 0%, #f0e7ff 60%, #ffeaf0 100%);
}

.feature-icon-config {
  color: #f05b55;
  background: linear-gradient(145deg, #fff8f5 0%, #ffe4e1 58%, #f7edff 100%);
}

.feature-icon-bank-select {
  color: #f05b55;
  background: linear-gradient(145deg, #fff6f4 0%, #ffdedd 58%, #fff1e9 100%);
}

.feature-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
}

.bank-select-hero {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at right top, rgba(255, 116, 89, .16), transparent 34%),
    linear-gradient(135deg, #fff, #fff4ee);
}

.bank-select-hero h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.bank-select-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.bank-current-select {
  position: relative;
  flex: 0 0 auto;
  min-width: 210px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff1ea;
  border: 1px solid rgba(255, 111, 78, .22);
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-current-select span {
  color: #e85542;
  font-size: 13px;
  font-weight: 900;
}

.bank-current-trigger {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #22122f;
  background: transparent;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bank-current-trigger i {
  color: #e85542;
  font-style: normal;
  transition: transform .18s ease;
}

.bank-current-select.open .bank-current-trigger i {
  transform: rotate(180deg);
}

.bank-current-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 100%;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(255, 111, 78, .22);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf7, #fff1ed);
  box-shadow: 0 18px 34px rgba(213, 79, 61, .16);
  display: none;
}

.bank-current-select.open .bank-current-menu {
  display: grid;
  gap: 6px;
}

.bank-current-menu button {
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  color: #3a2133;
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.bank-current-menu button:hover {
  background: #ffe8df;
}

.bank-current-menu button.active {
  color: #e85542;
  background: linear-gradient(135deg, #ffe5df, #f4edff);
}

.bank-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  gap: 10px;
}

.bank-carousel-arrow {
  align-self: center;
  width: 44px;
  height: 72px;
  border: 1px solid rgba(255, 111, 78, .22);
  border-radius: 999px;
  color: #e85542;
  background: linear-gradient(180deg, #fffaf7, #fff1ed);
  box-shadow: 0 12px 22px rgba(213, 79, 61, .12);
  font-size: 30px;
  font-weight: 900;
}

.bank-carousel-arrow:hover {
  background: #ffe8df;
}

.bank-card-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 4);
  grid-template-columns: none;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
}

.bank-card-grid::-webkit-scrollbar {
  height: 8px;
}

.bank-card-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #ffd2c8;
}

.bank-card {
  scroll-snap-align: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fff9f6);
  text-align: left;
  box-shadow: 0 14px 28px rgba(213, 79, 61, .08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bank-card:hover,
.bank-card.active {
  transform: translateY(-1px);
  border-color: rgba(255, 111, 78, .46);
  box-shadow: 0 18px 34px rgba(213, 79, 61, .13);
}

.bank-card.active {
  background: linear-gradient(180deg, #fff7f2, #fff1ed);
}

.bank-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.bank-card-head span {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #e85542;
  background: linear-gradient(145deg, #fff4ef, #ffdeda);
  font-size: 20px;
  font-weight: 900;
}

.bank-card-head strong {
  padding: 6px 10px;
  border-radius: 999px;
  color: #7a4dff;
  background: #f3edff;
  font-size: 12px;
}

.bank-card.active .bank-card-head strong {
  color: #0aa96b;
  background: #eafaf3;
}

.bank-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.bank-card p {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.bank-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-tags i {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1ea;
  color: #7a5f6f;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.bank-count {
  margin-top: 16px;
  color: #e85542;
  font-weight: 900;
}

.bank-summary-card {
  margin-top: 18px;
}

.bank-summary-card > div:first-child {
  margin-bottom: 14px;
}

.bank-summary-card p {
  margin: 0;
  color: var(--muted);
}

.bank-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.learner-status-card,
.learner-goal-card,
.config-status-card {
  border-color: #f3d9dc;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,244,246,.96));
  box-shadow: 0 18px 34px rgba(213, 79, 61, .09);
}

.learner-status-card {
  min-height: 268px;
}

.section-headline {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-headline .section-title {
  margin-bottom: 8px;
}

.section-headline p {
  margin: 0;
  color: #8b6070;
  font-size: 13px;
}

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

.status-box {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(247, 218, 189, .72);
  background:
    linear-gradient(135deg, #fff4e6, #fff0df);
}

.status-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-box strong {
  color: #00a86b;
}

.learner-next-panel {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 111, 78, .28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 82, 64, .12), rgba(255, 184, 88, .14)),
    #fff8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.learner-next-panel span {
  display: block;
  margin-bottom: 6px;
  color: #c84b3e;
  font-size: 12px;
  font-weight: 900;
}

.learner-next-panel strong {
  display: block;
  font-size: 16px;
  line-height: 1.5;
}

.next-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.progress-card {
  text-align: center;
}

.learner-goal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-progress-ring {
  width: 112px;
  height: 112px;
  margin: 6px auto 10px;
  border-radius: 50%;
  background: conic-gradient(#ff4f47 var(--progress), #f4dfd5 0);
  display: grid;
  place-items: center;
}

.mini-progress-ring div {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.mini-progress-ring strong {
  font-size: 22px;
}

.progress-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.compact-btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
}

.page-title-row {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-title-row h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-title-row p {
  margin: 0;
  color: var(--muted);
}

.challenge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-list div {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: #fff9f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rule-list strong {
  color: var(--ink);
}

.rule-list span {
  color: var(--muted);
  text-align: right;
}

.challenge-voice-card {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 12px;
}

.challenge-voice-card h3,
.challenge-voice-card p {
  margin: 0;
}

.challenge-voice-card p {
  color: var(--muted);
  line-height: 1.6;
}

.page:has(.call-training-layout) {
  width: min(1480px, calc(100% - 32px));
}

.call-setup-bar {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  box-shadow: 0 12px 26px rgba(104, 55, 155, .07);
}

.call-setup-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.call-setup-bar select,
.call-composer textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.call-setup-bar select {
  height: 46px;
  padding: 0 12px;
}

.call-setup-actions,
.call-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.call-training-layout {
  display: grid;
  grid-template-columns: 280px minmax(620px, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.call-main-stack {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.call-info-panel,
.call-side-stack {
  position: sticky;
  top: 18px;
}

.call-side-stack {
  display: grid;
  gap: 18px;
}

.call-profile {
  min-height: 74px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff4ef, #f2edff);
  display: grid;
  gap: 6px;
}

.call-profile strong {
  font-size: 20px;
}

.call-profile span {
  color: var(--muted);
  font-weight: 800;
}

.call-side-title {
  margin-bottom: 12px;
  align-items: center;
}

.call-info-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.call-info-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid #f3e4e8;
}

.call-info-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.call-info-list strong {
  display: block;
  line-height: 1.5;
}

.call-inline-settings {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.call-inline-settings label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.call-inline-settings select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.call-main-panel {
  min-height: 730px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(390px, 1fr) auto auto auto;
  gap: 0;
}

.call-record-main-panel {
  min-height: 650px;
}

.call-history-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e4d8ee;
  border-radius: 9px;
  color: #70568a;
  background: #faf7fd;
  font-size: 13px;
  font-weight: 900;
}

.call-record-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eee8f2;
}

.call-record-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.call-record-meta strong {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.call-record-transcript {
  scroll-behavior: auto;
}

.call-head {
  padding: 28px 30px 22px;
  border-bottom: 1px solid #edf0f5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.call-head h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.call-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.call-live-pill {
  min-height: 38px;
  padding: 0 14px 0 8px;
  border: 1px solid #d8f1e7;
  border-radius: 999px;
  background: #f3fffa;
  color: #116f53;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(22, 166, 122, .12);
}

.call-live-pill b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #18bd7b;
  font-size: 14px;
}

.call-live-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b7aec2;
}

.call-live-pill.active {
  color: #067a52;
  border-color: #bdebd9;
  background: #effcf7;
}

.call-live-pill.active span {
  background: #18bd7b;
  box-shadow: 0 0 0 6px rgba(24, 189, 123, .12);
}

.call-live-pill.ended {
  color: #d75544;
  border-color: #ffd3cb;
  background: #fff3f0;
  box-shadow: none;
}

.call-live-pill.ended b {
  background: #ff6f4e;
}

.call-live-pill.ended span {
  background: #ff6f4e;
}

.call-live-pill i {
  font-style: normal;
  font-weight: 900;
}

.call-live-pill em {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9f1ff;
  color: #2451a6;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.call-transcript {
  min-height: 390px;
  max-height: 520px;
  margin: 22px 30px 0;
  padding: 22px;
  border: 1px solid #eadfee;
  border-radius: 14px;
  background: #f8fafc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.call-empty,
.call-connecting-state {
  margin: auto;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.call-connecting-state {
  color: #123a63;
  font-size: 16px;
}

.call-message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eadfee;
  box-shadow: 0 8px 18px rgba(104, 55, 155, .06);
}

.call-message span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.call-message p {
  margin: 0;
  line-height: 1.65;
}

.call-message.sales {
  align-self: flex-end;
  color: #fff;
  background: linear-gradient(135deg, #ff7755, #8b4dff);
  border-color: transparent;
}

.call-message.sales span {
  color: rgba(255, 255, 255, .82);
}

.call-message.merchant {
  align-self: flex-start;
  background: #fff;
}

.call-message.system {
  align-self: center;
  max-width: 92%;
  color: #6f5c80;
  background: #f4f0ff;
}

.call-status-line {
  margin: 0 30px;
  min-height: 22px;
  color: #6f5c80;
  font-size: 13px;
  font-weight: 900;
}

.call-sync-warning {
  display: block;
  margin-top: 5px;
  color: #c74a2d;
  font-weight: 800;
}

.call-floor-banner {
  margin: 14px 30px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #bfead8;
  border-radius: 12px;
  background: #effcf5;
  color: #00804f;
  display: flex;
  align-items: center;
  font-weight: 900;
}

.call-text-fallback {
  margin: 0 30px 14px;
  padding: 12px;
  border: 1px solid #eadfee;
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.call-text-fallback > div {
  display: grid;
  gap: 4px;
}

.call-text-fallback strong {
  font-size: 14px;
}

.call-text-fallback span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.call-text-fallback textarea {
  width: 100%;
  min-height: 60px;
  max-height: 94px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.call-hidden-input {
  display: none;
}

.call-composer {
  display: grid;
  gap: 12px;
}

.call-composer textarea {
  min-height: 112px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.7;
}

.call-composer textarea:focus,
.call-setup-bar select:focus,
.call-inline-settings select:focus,
.call-text-fallback textarea:focus {
  border-color: rgba(255, 111, 78, .55);
  box-shadow: 0 0 0 4px rgba(255, 111, 78, .1);
}

.call-dock {
  min-height: 92px;
  margin-top: 16px;
  padding: 18px 30px;
  border-top: 1px solid #edf0f5;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.call-dock-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f5c80;
}

.call-dock-state span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #edf0f5;
  border: 5px solid #fff;
  box-shadow: 0 0 0 1px #dfe5ee;
}

.call-dock-state.active {
  color: #103354;
}

.call-dock-state.active span {
  background: #18bd7b;
  box-shadow: 0 0 0 8px rgba(24, 189, 123, .12);
}

.call-dock-state.ended span {
  background: #ff6f4e;
}

.call-dock-state strong {
  font-size: 16px;
}

.call-dock-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.call-talk-btn,
.call-connect-btn,
.call-hang-btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
}

.call-hang-btn {
  min-width: 130px;
  background: #ec174c;
  color: #fff;
  box-shadow: 0 14px 24px rgba(236, 23, 76, .18);
}

.call-score-panel {
  padding: 24px 28px;
}

.call-score-head {
  align-items: center;
  margin-bottom: 16px;
}

.call-score-head .section-title {
  margin: 0 0 5px;
}

.call-score-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.call-score-badge {
  min-width: 82px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  color: #5b31bc;
  background: #f4efff;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.call-score-loading {
  min-height: 78px;
  padding: 0 18px;
  border: 1px solid #e6ddf0;
  border-radius: 12px;
  color: #70568a;
  background: #fbf9fe;
  display: flex;
  align-items: center;
  font-weight: 900;
}

.call-score-overview {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) minmax(220px, .9fr);
  gap: 16px;
  align-items: stretch;
}

.call-score-total {
  min-height: 112px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff4ef, #f3edff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.call-score-total span {
  color: var(--muted);
  font-weight: 900;
}

.call-score-total strong {
  font-size: 42px;
  line-height: 1;
}

.call-score-chips {
  padding: 8px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.call-score-chips span {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #e9e0ef;
  border-radius: 10px;
  color: #655372;
  background: #fbfcff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.call-score-chips b {
  color: #4b2d8a;
  font-size: 16px;
}

.call-score-next-step {
  padding: 14px 16px;
  border: 1px solid #d9eee4;
  border-radius: 12px;
  background: #f4fcf8;
}

.call-score-next-step strong {
  color: #087a52;
  font-size: 13px;
}

.call-score-next-step p {
  margin: 8px 0 0;
  color: #476257;
  font-size: 13px;
  line-height: 1.55;
}

.call-score-next-step.off-topic {
  border-color: #ffd2cb;
  background: #fff5f2;
}

.call-score-next-step.off-topic strong {
  color: #d95743;
}

.call-score-next-step.off-topic p {
  color: #8d5148;
}

.call-score-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee8f2;
}

.call-score-details summary {
  width: fit-content;
  color: #6d42c6;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.call-score-details summary::-webkit-details-marker {
  display: none;
}

.call-score-details summary::after {
  content: '⌄';
  margin-left: 8px;
}

.call-score-details[open] summary::after {
  content: '⌃';
}

.call-dimension-list {
  margin: 14px 0;
  display: grid;
  gap: 12px;
}

.call-dimension {
  display: grid;
  gap: 7px;
}

.call-dimension div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.call-dimension i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e7f5;
}

.call-dimension i::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18bd7b, #8b4dff);
}

.call-dimension p,
.call-better-reply p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.call-score-evidence {
  padding: 9px 10px;
  border-left: 3px solid #55b790;
  border-radius: 8px;
  background: #f4fcf8;
  display: grid;
  gap: 4px;
}

.call-score-evidence strong {
  color: #087a52;
  font-size: 12px;
}

.call-score-evidence span {
  color: #49655a;
  font-size: 12px;
  line-height: 1.5;
}

.call-better-reply {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8f6fb;
}

.call-better-reply strong {
  display: block;
  margin-bottom: 6px;
}

.record-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.records-table .table-row {
  grid-template-columns: 1.05fr 1.15fr .85fr .65fr .65fr .75fr 1.15fr;
}

.records-table {
  height: 392px;
  max-height: 392px;
}

.records-table .clickable-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.records-table .clickable-row:hover,
.records-table .clickable-row:focus-visible {
  outline: 0;
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #ff744f;
}

.users-table .table-row {
  grid-template-columns: 1.05fr .65fr 1.18fr 1.25fr .62fr .62fr .72fr;
  overflow: visible;
  position: relative;
  z-index: 1;
  background: #fff;
}

.users-table {
  height: 430px;
  max-height: 430px;
  overflow-y: auto;
  overflow-x: hidden;
}

.users-table .table-row:has(.custom-select-wrap.open) {
  z-index: 120;
}

.users-table.card,
.users-table-wrap {
  overflow: visible;
}

.users-table .table-cell {
  min-width: 0;
}

.role-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.role-permission-card {
  min-height: 188px;
  padding: 22px;
  border: 1px solid #f0d8df;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #fff5f0);
  box-shadow: 0 18px 36px rgba(77, 38, 24, .06);
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.role-permission-card.leader {
  background: linear-gradient(145deg, #fff, #fff0f4);
}

.role-permission-card.admin {
  background: linear-gradient(145deg, #fff, #f5f0ff);
}

.role-permission-card h3 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.role-permission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #e94c37;
  background: #fff0ec;
  font-size: 13px;
  font-weight: 900;
}

.role-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-permission-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #6c5369;
  background: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 800;
}

.role-select {
  width: min(180px, 100%);
  height: 40px;
  padding: 0 12px;
  border: 1px solid #f0d5dc;
  border-radius: 12px;
  color: var(--ink);
  background: #fff8f6;
  font-weight: 900;
  outline: 0;
}

.table-role-field {
  display: block;
}

.table-role-field .custom-select-trigger {
  min-height: 40px;
  border-color: #ffd0c8;
  border-radius: 999px;
  color: #2b1635;
  background: linear-gradient(135deg, #fff7f2, #fff0f6);
  font-size: 14px;
  box-shadow: none;
  white-space: nowrap;
}

.table-role-field .custom-select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-role-field .custom-select-trigger i {
  color: #f15b43;
}

.table-role-field .custom-select-menu {
  min-width: 210px;
  z-index: 9999;
  border-color: #ffd4cc;
  border-radius: 16px;
  background: #fff8f6;
  box-shadow: 0 18px 36px rgba(77, 38, 24, .12);
}

.floating-select-menu {
  z-index: 9999;
  overflow: auto;
}

.table-role-field .custom-select-menu button {
  border-radius: 12px;
  color: #4d3c54;
  font-weight: 900;
}

.table-role-field .custom-select-menu button:hover,
.table-role-field .custom-select-menu button.active {
  color: #f05b3f;
  background: linear-gradient(135deg, #fff0ec, #f5ecff);
}

.permission-cell {
  color: #6f5c80;
  font-size: 14px;
  line-height: 1.5;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-card {
  display: grid;
  gap: 18px;
}

.profile-avatar-large {
  width: 78px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #ff6d4d, #7a4dff);
  font-size: 34px;
  font-weight: 1000;
  box-shadow: 0 18px 34px rgba(122, 77, 255, .22);
}

.profile-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.profile-meta-list {
  display: grid;
  gap: 10px;
}

.profile-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.profile-meta-list span {
  color: var(--muted);
  font-weight: 800;
}

.profile-meta-list strong {
  text-align: right;
}

.profile-settings-card {
  display: grid;
  gap: 18px;
}

.profile-field {
  max-width: 420px;
}

.profile-bank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-bank-option {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid #f0d5dc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: var(--ink);
  background: #fff;
}

.profile-bank-option:hover,
.profile-bank-option.active {
  border-color: #ff7b5d;
  background: #fff7f2;
  box-shadow: 0 12px 26px rgba(255, 121, 83, .12);
}

.profile-bank-option span {
  font-weight: 1000;
}

.profile-bank-option strong {
  flex: 0 0 auto;
  color: #e94c37;
  font-size: 13px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.knowledge-doc-table {
  height: 520px;
  max-height: 520px;
}

.knowledge-doc-table .table-row {
  grid-template-columns: 1.45fr .8fr .75fr 1fr;
}

.module-performance-table {
  height: 336px;
  max-height: 336px;
}

.score-good {
  color: #18a76c;
}

.score-normal {
  color: var(--orange);
}

.record-detail-title {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.record-detail-title h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.record-detail-title p {
  margin: 0;
  color: var(--muted);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-head {
  min-height: auto;
  padding: 0;
  background: #fff5e8;
  display: block;
}

.hero-banner {
  width: 100%;
  min-height: 116px;
  display: block;
  object-fit: cover;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.2;
}

.hero-copy {
  margin: 0;
  color: rgba(255, 255, 255, .82);
}

.status-pill {
  min-width: 92px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  font-weight: 700;
}

.main-grid {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  gap: 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(10, 25, 56, .06);
}

.card.pad {
  padding: 22px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.2;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--orange);
  font-weight: 900;
  font-size: 13px;
}

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

.module-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fffaf6);
  text-align: left;
  transition: .16s ease;
}

.module-card:hover {
  border-color: #ffd0b7;
  box-shadow: 0 16px 30px rgba(255, 122, 47, .16);
  transform: translateY(-1px);
}

.module-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff8547, #7a4dff);
  font-weight: 900;
}

.module-name {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.module-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.desktop-summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary-head .section-title {
  margin-bottom: 8px;
}

.summary-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-pill.web {
  color: #d95518;
  background: #fff0e7;
  flex: 0 0 auto;
}

.quick-start {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
}

.quick-start button {
  width: 100%;
}

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

.summary-metric {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fff7ef);
}

.summary-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
  color: var(--purple);
}

.scope-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.scope-title {
  padding: 12px 14px;
  color: #7a4d36;
  background: #fff6ef;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.scope-row {
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf1f7;
}

.scope-row:last-child {
  border-bottom: 0;
}

.scope-row.active {
  color: #d95518;
  background: #fff0e7;
}

.scope-row span {
  font-weight: 900;
}

.scope-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.phone-preview {
  width: 314px;
  max-width: 100%;
  margin: 0 auto;
  border: 8px solid #222;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(5, 12, 30, .18);
  overflow: hidden;
}

.phone-screen {
  padding: 16px;
}

.phone-top {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.phone-title-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-title {
  margin: 0;
  font-size: 16px;
}

.phone-mode {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  font-size: 12px;
  font-weight: 800;
}

.pick-group {
  margin-top: 18px;
}

.pick-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.pick-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.pick-item {
  padding: 11px 12px;
  border-bottom: 1px solid #eef1f7;
  color: var(--ink);
  font-size: 12px;
}

.pick-item:last-child {
  border-bottom: 0;
}

.pick-item.active {
  color: var(--purple);
  background: #ebe9ff;
}

.phone-primary {
  width: 100%;
  height: 42px;
  margin-top: 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--purple);
  box-shadow: 0 12px 22px rgba(102, 87, 255, .28);
  font-weight: 900;
}

.stats-card {
  color: var(--ink);
  border-color: #f1e2e8;
  background: linear-gradient(180deg, #fff, #fff9f6);
}

.stats-tabs {
  height: 32px;
  padding: 4px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #fff0ec;
}

.stats-tabs button {
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #8a7180;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.stats-tabs button:hover {
  background: rgba(255, 255, 255, .72);
}

.stats-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #ff725e, #8757ff);
}

.stats-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-box {
  min-height: 82px;
  padding: 14px;
  border: 1px solid #f1e2e8;
  border-radius: 10px;
  background: #fff;
}

.stat-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-value {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.stat-value.green {
  color: #18a76c;
}

.stat-value.orange {
  color: #ff7a2f;
}

.today-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #f1e2e8;
  border-radius: 10px;
  background: #fff7f2;
}

.today-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.today-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
}

.today-answer {
  color: var(--orange);
}

.today-correct {
  color: #18a76c;
}

.today-wrong {
  color: var(--purple);
}

.today-row span {
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.back-btn,
.primary-btn,
.ghost-btn,
.soft-btn,
.danger-btn {
  height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}

.back-btn {
  padding-left: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ff8547, #7a4dff);
  box-shadow: 0 12px 22px rgba(255, 122, 47, .20);
}

.ghost-btn {
  color: var(--blue);
  border: 1px solid var(--line);
  background: #fff;
}

.soft-btn {
  color: var(--purple);
  background: #f3edff;
}

.danger-btn {
  color: #fff;
  background: var(--red);
}

.danger-soft-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #ffd0c8;
  border-radius: 8px;
  color: #e34835;
  background: #fff1ee;
  font-weight: 900;
}

.danger-soft-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff6b58, #e34835);
  box-shadow: 0 10px 20px rgba(227, 72, 53, .16);
}

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

.config-page {
  display: grid;
  gap: 18px;
}

.config-section {
  transition: box-shadow .18s ease, border-color .18s ease;
}

.config-section-head {
  width: 100%;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.config-section-head .section-title {
  margin: 0;
}

.config-section-arrow {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #f15b43;
  background: #fff1ee;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .18s ease, background .18s ease;
}

.config-section-head:hover .config-section-arrow {
  background: #ffe2dc;
}

.config-section.collapsed .config-section-arrow {
  transform: rotate(0deg);
}

.config-section-body {
  margin-top: 16px;
}

.config-guide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.config-guide-card {
  border: 1px solid #f2ded8;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #fff8f5, #fff);
}

.config-guide-card.required {
  border-color: #ffb9ad;
  background: linear-gradient(135deg, #fff0ec, #fff8f5);
}

.config-guide-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.config-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #f05b3f;
  background: #fff0ec;
  font-size: 13px;
  font-weight: 900;
}

.config-section.collapsed .config-section-body {
  display: none;
}

.save-tip {
  color: #18a76c;
  font-weight: 900;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.field input,
.field select {
  height: 44px;
  padding: 0 12px;
}

.custom-select-wrap {
  position: relative;
}

.custom-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #ead9df;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #fff8f7);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.custom-select-trigger i {
  color: #f05b3f;
  font-style: normal;
  font-size: 18px;
  transition: transform .18s ease;
}

.custom-select-wrap.open .custom-select-trigger {
  border-color: #ffb2a3;
  box-shadow: 0 10px 24px rgba(255, 109, 78, .12);
}

.custom-select-wrap.open .custom-select-trigger i {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 260px;
  padding: 8px;
  border: 1px solid #f2d4cb;
  border-radius: 14px;
  display: none;
  overflow: auto;
  background: #fffdfb;
  box-shadow: 0 18px 38px rgba(54, 22, 18, .14);
}

.custom-select-wrap.open .custom-select-menu {
  display: grid;
  gap: 4px;
}

.custom-select-menu button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: #3d3047;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.custom-select-menu button:hover,
.custom-select-menu button.active {
  color: #f05b3f;
  background: linear-gradient(90deg, #fff0ec, #f5edff);
}

.password-field-wrap {
  position: relative;
}

.password-field-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
  transition: background .18s ease, transform .18s ease;
}

.password-toggle:hover {
  background: rgba(255, 111, 78, .08);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: #8e7b89;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.password-toggle.is-visible svg {
  stroke: #f05b3f;
}

.field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.upload-zone {
  min-height: 180px;
  border: 1px dashed #b9c4d6;
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fbfcff;
}

.upload-zone.drag-over {
  border-color: #f05b3f;
  background: #fff4f0;
  box-shadow: inset 0 0 0 2px rgba(240, 91, 63, .12);
}

.upload-zone strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.upload-zone p {
  margin: 0 0 14px;
  color: var(--muted);
}

.upload-selected-panel {
  width: min(620px, 100%);
  min-height: 58px;
  margin: 12px auto 16px;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: #8b7889;
  background: transparent;
}

.upload-selected-panel.has-file {
  justify-content: center;
  text-align: center;
  background: transparent;
}

.upload-file-item {
  position: relative;
  width: 112px;
  min-height: 94px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  color: #2b2435;
  background: transparent;
}

.upload-file-item:hover {
  background: rgba(255, 246, 242, .8);
}

.upload-file-item.active {
  border-color: #ffd0c4;
  background: #fff5f1;
}

.remove-pending-file {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #f05b3f;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(240, 91, 63, .28);
}

.remove-pending-file:hover {
  background: #d93d2b;
}

.upload-file-icon {
  position: relative;
  width: 44px;
  height: 54px;
  border: 1px solid #c4ccd8;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #23a866;
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(41, 52, 75, .10);
}

.upload-file-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 13px;
  height: 13px;
  border-left: 1px solid #bfc8d6;
  border-bottom: 1px solid #bfc8d6;
  border-radius: 0 4px 0 2px;
  background: linear-gradient(135deg, #eef3f8 50%, #fff 50%);
}

.upload-file-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 13px;
  height: 16px;
  border-radius: 4px;
  background: #21ad68;
  z-index: 0;
}

.upload-file-icon.file-type-excel {
  color: #12834c;
}

.upload-file-icon.file-type-excel::after {
  background: #21ad68;
}

.upload-file-icon.file-type-word {
  color: #1e5fbf;
}

.upload-file-icon.file-type-word::after {
  background: #2f75d6;
}

.upload-file-icon.file-type-pdf {
  color: #d63d35;
}

.upload-file-icon.file-type-pdf::after {
  background: #e34b43;
}

.upload-file-icon.file-type-text,
.upload-file-icon.file-type-file {
  color: #5d6778;
}

.upload-file-icon.file-type-text::after,
.upload-file-icon.file-type-file::after {
  background: #7d8796;
}

.upload-file-icon {
  z-index: 1;
}

.upload-file-icon {
  line-height: 1;
}

.upload-file-icon {
  text-shadow: none;
}

.upload-file-name {
  width: 100%;
  color: #2b2435;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-size {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.upload-empty-text {
  font-size: 13px;
  font-weight: 800;
}

.upload-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-input {
  display: none;
}

.upload-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.selected-upload-file {
  display: inline-flex;
  margin: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #5f4152;
  background: #fff1ea;
  font-weight: 800;
}

.knowledge-upload-modal {
  width: min(720px, 100%);
  padding: 24px;
}

.upload-file-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.upload-file-summary span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #5f4152;
  background: #fff3ed;
  font-weight: 800;
}

.upload-dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.upload-dept-btn {
  position: relative;
  min-height: 86px;
  padding: 16px;
  border: 1px solid #f1d6cd;
  border-radius: 14px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #fff8f2);
  text-align: left;
}

.upload-dept-btn strong {
  font-size: 18px;
}

.upload-dept-btn span {
  color: var(--muted);
  font-weight: 800;
}

.upload-dept-btn:hover,
.upload-dept-btn.active {
  border-color: #ff8d78;
  background: linear-gradient(135deg, #fff0ec, #f4ecff);
  box-shadow: 0 14px 28px rgba(255, 111, 78, .14);
}

.delete-dept-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #f05b3f;
  font-style: normal;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(240, 91, 63, .22);
}

.delete-dept-btn:hover {
  background: #d93d2b;
}

.new-dept-line {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.new-dept-line input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ead9df;
  border-radius: 12px;
  outline: 0;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.review-queue {
  display: grid;
  gap: 12px;
}

.review-card {
  padding: 16px;
  border: 1px solid #f2dfcf;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fff8ee);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-card strong {
  display: block;
  margin-bottom: 6px;
}

.review-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty-review {
  padding: 22px;
  border-radius: 12px;
  color: var(--muted);
  background: #fff8ee;
  text-align: center;
}

.file-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.fixed-scroll-table {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.fixed-scroll-table::-webkit-scrollbar {
  width: 10px;
}

.fixed-scroll-table::-webkit-scrollbar-track {
  background: #fff5f4;
  border-left: 1px solid #f2dce2;
}

.fixed-scroll-table::-webkit-scrollbar-thumb {
  border: 2px solid #fff5f4;
  border-radius: 999px;
  background: #d9aeb9;
}

.fixed-scroll-table::-webkit-scrollbar-thumb:hover {
  background: #c78393;
}

.fixed-scroll-table .table-row.head {
  position: sticky;
  top: 0;
  z-index: 25;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr .8fr;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row.head {
  min-height: 48px;
  color: #52617a;
  background: #f7f9fc;
  font-weight: 900;
}

.table-cell {
  padding: 12px 16px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  align-items: center;
  color: var(--blue);
  background: #eef4ff;
  font-weight: 800;
  font-size: 13px;
}

.tag.green {
  color: #058b3b;
  background: #eafbf1;
}

.tag.pending {
  color: #7a4dff;
  background: #f1edff;
}

.tag.red {
  color: #b22333;
  background: #fff0f2;
}

.practice-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
}

.question-card {
  min-height: 520px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.question-count {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #f3f6fb;
  font-weight: 800;
}

.question-count:hover {
  color: var(--purple);
  background: var(--purple-2);
}

.question-title {
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.45;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.option:hover,
.option.selected {
  border-color: var(--purple);
  background: var(--purple-2);
}

.option-key {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
  flex: 0 0 auto;
}

.voice-question-panel {
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, #fbfbff, #f4f2ff);
}

.voice-orb {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff8547, #7a4dff);
  box-shadow: 0 18px 34px rgba(255, 122, 47, .24);
  font-size: 28px;
  font-weight: 900;
}

.voice-question-panel h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.voice-question-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.visible-question-text {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 111, 78, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7f2, #fff2f4);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.6;
}

.challenge-answer-box {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.challenge-answer-box label {
  color: var(--muted);
  font-weight: 900;
}

.text-question-answer {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.text-question-answer label {
  color: var(--muted);
  font-weight: 900;
}

.text-question-answer textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, #fff9f7);
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
  outline: none;
}

.text-question-answer textarea:focus {
  border-color: rgba(255, 111, 78, .55);
  box-shadow: 0 0 0 4px rgba(255, 111, 78, .1);
}

.voice-transcript-box {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.voice-text-input {
  resize: vertical;
  font: inherit;
  outline: none;
}

.voice-text-input:focus {
  border-color: rgba(255, 111, 78, .55);
  box-shadow: 0 0 0 4px rgba(255, 111, 78, .1);
}

.answer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.clear-transcript-btn {
  height: 42px;
  padding: 0 22px;
  border: 1px solid rgba(255, 111, 78, .22);
  border-radius: 999px;
  color: #e85542;
  background: #fff7f2;
  font-weight: 900;
}

.clear-transcript-btn:hover {
  background: #ffece5;
}

.voice-status {
  min-height: 22px;
  color: #6f5c80;
  font-size: 13px;
  font-weight: 800;
}

.config-test-status {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #eadfee;
  border-radius: 12px;
  color: #6f5c80;
  background: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 800;
}

.config-test-status.error {
  color: #d93025;
  border-color: #ffd0ca;
  background: #fff1ef;
}

.config-contract {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #eadfee;
  border-radius: 12px;
  background: #fff;
  color: #6f5c80;
  font-size: 13px;
  line-height: 1.7;
}

.config-contract strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.config-contract p {
  margin: 4px 0;
}

.config-contract code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--purple-2);
  color: var(--purple);
  font-weight: 800;
}

.hold-voice-btn {
  height: 40px;
  min-width: 128px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--purple);
  background: var(--purple-2);
  font-weight: 900;
}

.hold-voice-btn.recording {
  color: #fff;
  background: var(--red);
}

.question-actions {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 32px;
  display: grid;
  place-items: center;
  background: rgba(7, 20, 47, .35);
}

.question-map-modal {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 64px));
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.question-preview-modal {
  width: min(1060px, 100%);
  max-height: min(820px, calc(100vh - 64px));
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.doc-edit-modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 64px));
  padding: 24px;
  overflow: auto;
}

.timeout-prompt-modal {
  width: min(360px, 100%);
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fff7ed);
}

.timeout-prompt-modal h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.timeout-prompt-modal p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.question-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.question-map-head h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.question-map-head p {
  margin: 0;
  color: var(--muted);
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.map-legend .done {
  background: var(--green);
}

.map-legend .current {
  background: var(--purple);
}

.map-legend .todo {
  border: 1px solid var(--line);
  background: #fff;
}

.question-map-grid {
  padding: 2px 4px 4px 2px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
}

.question-map-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.question-map-actions p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.question-dot {
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.question-dot.done {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.question-dot.todo {
  color: #52617a;
  background: #f8fafc;
}

.question-dot.current {
  outline: 3px solid rgba(102, 87, 255, .25);
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
}

.question-dot:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(10, 25, 56, .10);
}

.preview-question-list {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 8px;
}

.preview-question-table-wrap {
  overflow: auto;
  border: 1px solid #ead9df;
  border-radius: 14px;
  background: #fffaf6;
}

.preview-question-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  color: var(--ink);
}

.preview-question-table th,
.preview-question-table td {
  border: 1px solid #ead9df;
  padding: 12px 10px;
  vertical-align: top;
  line-height: 1.55;
  word-break: break-word;
  background: #fff;
}

.preview-question-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #584b6d;
  background: linear-gradient(180deg, #fff3ef, #f7f2ff);
  font-weight: 900;
  text-align: left;
}

.preview-question-table tbody tr:nth-child(even) td {
  background: #fff9f3;
}

.preview-question-table tbody tr:hover td {
  background: #fff0ec;
}

.preview-question-table th:nth-child(1),
.preview-question-table td:nth-child(1) {
  width: 64px;
  text-align: center;
  font-weight: 900;
}

.preview-question-table th:nth-child(2),
.preview-question-table td:nth-child(2) {
  width: 260px;
}

.preview-question-table th:nth-child(5),
.preview-question-table td:nth-child(5),
.preview-question-table th:nth-child(7),
.preview-question-table td:nth-child(7) {
  width: 220px;
}

.preview-question-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff9f7;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
}

.preview-question-index {
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff725e, #8757ff);
  font-weight: 900;
}

.preview-question-item h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.preview-question-item p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.side-panel {
  padding: 18px;
}

.progress-ring {
  width: 130px;
  height: 130px;
  margin: 10px auto 18px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--progress), #f1e9f5 0);
  display: grid;
  place-items: center;
}

.progress-ring-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}

.progress-ring-inner strong {
  display: block;
  font-size: 28px;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fd;
}

.result-head {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: center;
}

.score-ring {
  width: 168px;
  height: 168px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--score), #f1e9f5 0);
  display: grid;
  place-items: center;
}

.score-inner {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}

.score-inner strong {
  display: block;
  font-size: 44px;
}

.score-grade {
  text-align: center;
}

.score-grade strong {
  display: block;
  color: var(--orange);
  font-size: 34px;
}

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

.metric {
  padding: 16px;
  border-radius: 10px;
  background: #f7f9fd;
}

.metric span {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.analysis-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.section-title-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row .section-title {
  margin: 0;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-regrade-btn {
  margin-top: 8px;
  min-height: 32px;
}

.review-filter {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid rgba(255, 111, 78, .2);
  border-radius: 10px;
  background: #fff7f2;
  gap: 4px;
}

.review-filter button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b648a;
  font-weight: 900;
  cursor: pointer;
}

.review-filter button.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 6px 16px rgba(255, 111, 78, .12);
}

.compact-review-shell {
  position: relative;
  flex: 0 0 auto;
}

.compact-review-progress {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.review-progress-trigger {
  color: var(--purple);
  background: var(--purple-2);
}

.review-progress-summary {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.compact-question-map {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(520px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 12, 36, .18);
}

.compact-question-map-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.compact-question-map-head strong {
  font-size: 16px;
}

.compact-question-map-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-map-close {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
}

.compact-map-legend {
  margin-bottom: 10px;
  gap: 12px;
  font-size: 13px;
}

.compact-review-grid {
  max-height: 220px;
  grid-template-columns: repeat(10, minmax(34px, 1fr));
  gap: 8px;
  padding: 2px 4px 4px 2px;
}

.compact-review-grid .question-dot {
  height: 34px;
  border-radius: 8px;
  font-size: 14px;
}

.review-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0 8px 0 34px;
}

.review-item {
  position: relative;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fd;
  margin-bottom: 10px;
}

.review-question-index {
  position: absolute;
  left: -31px;
  top: 0;
  width: 26px;
  min-height: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #7b648a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.review-item.wrong {
  border-left: 4px solid var(--red);
}

.review-item.right {
  border-left: 4px solid var(--green);
}

.review-item.review-focus {
  outline: 2px solid rgba(122, 77, 255, .28);
  background: #fbf9ff;
}

.review-user-answer {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef2f7;
}

.review-user-answer span,
.review-correct-answer strong,
.review-score-line {
  font-weight: 900;
}

.review-correct-answer {
  color: #150b2e;
}

.grade-point-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.grade-point-summary p {
  margin: 0;
}

.grade-point-summary b {
  font-weight: 900;
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 93, 76, .16), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(145, 90, 255, .12), transparent 30%),
    linear-gradient(135deg, #fff7f4 0%, #fff0f2 48%, #fffafa 100%);
}

.login-card {
  width: min(560px, 100%);
  border: 1px solid #f2d8d3;
  border-radius: 24px;
  padding: 34px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 60px rgba(88, 35, 25, .12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand img {
  width: 132px;
  height: auto;
  padding: 8px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe3e2, #fff3f5);
}

.login-brand span {
  color: #180b2f;
  font-size: 18px;
  font-weight: 900;
}

.login-copy h1 {
  margin: 0 0 10px;
  color: #120725;
  font-size: 32px;
  line-height: 1.2;
}

.login-copy p {
  margin: 0;
  color: #6d607b;
  font-size: 15px;
  line-height: 1.75;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.wecom-login-btn,
.bootstrap-config-btn {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.wecom-login-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff765f, #8f56ff);
  box-shadow: 0 16px 30px rgba(255, 100, 80, .18);
}

.bootstrap-config-btn {
  border: 1px solid #ead9f7;
  color: #7a49ff;
  background: #f3edff;
}

.login-note {
  margin: 18px 0 0;
  border: 1px solid #f5d8cc;
  border-radius: 14px;
  padding: 12px 14px;
  color: #796a83;
  background: #fff7f0;
  line-height: 1.7;
}

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

  .app-sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    height: 56px;
    padding: 0 14px;
  }

  .page {
    width: calc(100% - 28px);
    margin-top: 14px;
  }

  .main-grid,
  .practice-layout,
  .result-head,
  .analysis-grid,
  .feature-grid,
  .dashboard-bottom,
  .status-grid,
  .challenge-grid,
  .call-setup-bar,
  .call-training-layout,
  .call-main-stack,
  .call-score-overview,
  .record-summary-grid,
  .profile-grid,
  .profile-bank-list {
    grid-template-columns: 1fr;
  }

  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: stretch;
  }

  .section-actions .soft-btn {
    width: 100%;
  }

  .review-filter {
    width: 100%;
  }

  .review-filter button {
    flex: 1 1 0;
  }

  .compact-review-shell,
  .compact-review-progress,
  .review-progress-trigger {
    width: 100%;
  }

  .compact-review-progress {
    justify-content: stretch;
  }

  .review-progress-summary {
    white-space: normal;
  }

  .compact-question-map {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .compact-question-map-head {
    grid-template-columns: 1fr auto;
  }

  .compact-question-map-head span {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .module-grid,
  .form-grid,
  .metric-grid,
  .stats-grid,
  .quick-start,
  .summary-metrics {
    grid-template-columns: 1fr;
  }

  .modal-mask {
    padding: 16px;
  }

  .question-map-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .question-map-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .learner-next-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-select-hero,
  .bank-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-carousel {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .bank-carousel-arrow {
    width: 38px;
    height: 58px;
  }

  .bank-card-grid {
    grid-auto-columns: minmax(240px, 82%);
  }

  .next-actions {
    justify-content: flex-start;
  }

  .voice-question-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .voice-orb {
    margin: 0 auto;
  }

  .answer-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .call-info-panel,
  .call-side-stack {
    position: static;
  }

  .call-head,
  .call-actions,
  .call-setup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .call-live-pill {
    width: 100%;
    justify-content: center;
  }

  .call-message {
    max-width: 96%;
  }

  .call-text-fallback {
    grid-template-columns: 1fr;
  }

  .call-dock {
    align-items: stretch;
    flex-direction: column;
  }

  .call-dock-actions {
    justify-content: stretch;
  }

  .call-dock-actions button {
    flex: 1 1 0;
  }

  .call-score-chips {
    grid-template-columns: 1fr;
  }

  .home-banner {
    align-items: flex-start;
    flex-direction: column;
    min-height: 172px;
  }

  .home-banner::after {
    background:
      linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.72) 44%, rgba(255,245,236,.08) 100%),
      url("./assets/training-growth-banner-wide.png") right center / 100% 100% no-repeat;
  }

  .home-banner h2 {
    font-size: 24px;
  }

  .trophy {
    right: 132px;
    bottom: 14px;
    top: auto;
    transform: none;
    width: 62px;
    height: 58px;
    font-size: 38px;
  }

  .table {
    overflow-x: auto;
  }

  .table-row {
    min-width: 760px;
  }
}
