:root {
  --kt-navy: #15254b;
  --kt-blue: #3563e9;
  --kt-cyan: #25b8d7;
  --kt-yellow: #ffcf4a;
  --kt-coral: #ff7a6f;
  --kt-green: #33b679;
  --kt-ink: #1e2a44;
  --kt-muted: #6f7891;
  --kt-bg: #f5f7fc;
  --kt-line: #e4e8f2;
  --kt-radius: 1.15rem;
  --kt-shadow: 0 10px 30px rgba(31, 43, 78, .08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--kt-bg); color: var(--kt-ink); font-family: "Nunito", system-ui, -apple-system, sans-serif; font-size: 1rem; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; width: 260px; padding: 1.35rem 1rem; background: var(--kt-navy); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .65rem 1.5rem; font-weight: 900; font-size: 1.45rem; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--kt-navy); background: var(--kt-yellow); transform: rotate(-3deg); }
.brand-mark i { transform: rotate(3deg); }
.sidebar-label { padding: .5rem .8rem; color: #93a0c2; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidebar .nav-link { display: flex; align-items: center; gap: .8rem; margin: .12rem 0; padding: .76rem .85rem; border-radius: .8rem; color: #c9d1e6; font-weight: 700; }
.sidebar .nav-link i { width: 1.25rem; font-size: 1.1rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.11); }
.sidebar .nav-link.active::before { content: ""; width: 5px; height: 22px; border-radius: 8px; background: var(--kt-yellow); margin-left: -.85rem; }
.school-chip { margin-top: auto; padding: .9rem; border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; background: rgba(255,255,255,.06); }
.main { min-height: 100vh; margin-left: 260px; }
.topbar { min-height: 76px; padding: .8rem clamp(1rem, 3vw, 2.25rem); border-bottom: 1px solid var(--kt-line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.topbar-actions { display: flex; align-items: center; gap: .65rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--kt-line); border-radius: 50%; background: #fff; color: var(--kt-ink); display: grid; place-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #dfe7ff; color: var(--kt-blue); font-weight: 900; }
.content { padding: clamp(1.1rem, 3vw, 2.3rem); }
.eyebrow { margin-bottom: .25rem; color: var(--kt-blue); font-size: .8rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, h4, h5, h6 { color: var(--kt-ink); font-weight: 900; letter-spacing: -.025em; }
.page-title { margin-bottom: .3rem; font-size: clamp(1.75rem, 4vw, 2.45rem); }
.text-muted { color: var(--kt-muted) !important; }
.btn { border-radius: .78rem; font-weight: 800; padding: .65rem 1rem; }
.btn-primary { border-color: var(--kt-blue); background: var(--kt-blue); box-shadow: 0 7px 18px rgba(53,99,233,.22); }
.btn-light { border-color: var(--kt-line); background: #fff; }
.panel { height: 100%; border: 1px solid var(--kt-line); border-radius: var(--kt-radius); background: #fff; box-shadow: var(--kt-shadow); }
.panel-header { padding: 1.25rem 1.25rem .5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-body { padding: 1.25rem; }
.stat-card { position: relative; overflow: hidden; min-height: 142px; padding: 1.2rem; border: 1px solid var(--kt-line); border-radius: var(--kt-radius); background: #fff; }
.stat-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -26px; top: -22px; border-radius: 50%; background: var(--accent-soft); }
.stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--accent); background: var(--accent-soft); font-size: 1.2rem; }
.stat-value { margin: 1rem 0 .1rem; font-size: 2rem; font-weight: 900; line-height: 1; }
.stat-label { color: var(--kt-muted); font-weight: 700; }
.accent-blue { --accent: var(--kt-blue); --accent-soft: #e7edff; }
.accent-green { --accent: var(--kt-green); --accent-soft: #e0f6eb; }
.accent-coral { --accent: var(--kt-coral); --accent-soft: #ffebe9; }
.accent-yellow { --accent: #bb8400; --accent-soft: #fff4cf; }
.welcome-card { position: relative; overflow: hidden; padding: clamp(1.35rem, 3vw, 2rem); border-radius: 1.4rem; color: #fff; background: linear-gradient(120deg, #3159d6, #1c95c5); box-shadow: 0 14px 35px rgba(42, 92, 191, .25); }
.welcome-card h2, .welcome-card p { color: #fff; }
.welcome-card::before, .welcome-card::after { content: ""; position: absolute; border-radius: 50%; border: 18px solid rgba(255,255,255,.09); }
.welcome-card::before { width: 180px; height: 180px; right: -40px; top: -70px; }
.welcome-card::after { width: 95px; height: 95px; right: 125px; bottom: -60px; }
.quick-action { display: flex; align-items: center; gap: .85rem; padding: .9rem; border: 1px solid var(--kt-line); border-radius: .95rem; text-decoration: none; transition: .2s ease; }
.quick-action:hover { border-color: #b8c5ea; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31,43,78,.08); }
.quick-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #edf1ff; color: var(--kt-blue); font-size: 1.15rem; }
.progress { height: 9px; border-radius: 20px; background: #edf0f6; }
.progress-bar { border-radius: 20px; }
.activity-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; padding: .95rem 0; border-bottom: 1px solid var(--kt-line); }
.activity-item:last-child { border-bottom: 0; }
.badge-soft { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .62rem; border-radius: 20px; font-size: .78rem; font-weight: 900; }
.badge-blue { color: #2852c6; background: #e8eeff; }
.badge-green { color: #158354; background: #dff6ea; }
.badge-yellow { color: #926400; background: #fff2c9; }
.badge-coral { color: #c84e44; background: #ffe5e2; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .95rem 1.1rem; border-color: var(--kt-line); vertical-align: middle; }
.table thead th { color: var(--kt-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.person { display: flex; align-items: center; gap: .7rem; }
.person-avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: #e7edff; color: var(--kt-blue); }
.mobile-brand { display: none; }
.empty-state { max-width: 430px; margin: auto; padding: 3rem 1.5rem; text-align: center; }
.empty-icon { width: 82px; height: 82px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 26px; color: var(--kt-blue); background: #eaf0ff; font-size: 2rem; transform: rotate(-4deg); }
.form-control, .form-select { min-height: 46px; border-color: var(--kt-line); border-radius: .75rem; }
.form-control:focus, .form-select:focus { border-color: #9db0ec; box-shadow: 0 0 0 .22rem rgba(53,99,233,.12); }
.form-label { font-weight: 800; }
.quiz-card { position: relative; overflow: hidden; }
.quiz-ribbon { height: 7px; background: var(--quiz-color, var(--kt-blue)); }
.quiz-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--quiz-color, var(--kt-blue)); background: color-mix(in srgb, var(--quiz-color, var(--kt-blue)) 13%, white); font-size: 1.25rem; }
.filter-scroll { display: flex; gap: .55rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-pill { flex: 0 0 auto; border: 1px solid var(--kt-line); border-radius: 999px; padding: .52rem .9rem; background: #fff; color: var(--kt-muted); font-weight: 800; }
.filter-pill.active { border-color: var(--kt-navy); color: #fff; background: var(--kt-navy); }
.builder-step { display: flex; gap: .8rem; }
.step-number { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--kt-blue); background: #e8eeff; font-weight: 900; }
.question-card { border: 1px solid var(--kt-line); border-radius: 1rem; background: #fff; }
.drag-handle { cursor: grab; color: #a3abc0; }
.answer-row { display: flex; align-items: center; gap: .65rem; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 15px 0 45px rgba(8,19,52,.2); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-brand { display: flex; align-items: center; gap: .55rem; font-weight: 900; }
  .mobile-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .page-context { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgba(12,23,51,.42); opacity: 0; visibility: hidden; transition: .2s; }
  .sidebar-backdrop.show { opacity: 1; visibility: visible; }
}

@media (max-width: 575.98px) {
  .topbar { min-height: 66px; }
  .content { padding: 1rem; }
  .welcome-card { border-radius: 1.1rem; }
  .panel, .stat-card { border-radius: 1rem; box-shadow: 0 7px 20px rgba(31,43,78,.06); }
  .activity-item { grid-template-columns: auto 1fr; }
  .activity-item > :last-child { grid-column: 2; justify-self: start; }
  .mobile-stack { display: grid !important; grid-template-columns: 1fr; }
  .table-responsive .table { min-width: 680px; }
  .hide-mobile { display: none !important; }
}

/* ---------------------------------------------------------------------- */
/* App bridge: applies the design system to plain Bootstrap components    */
/* used across screens that haven't been rebuilt with panel/stat markup.  */
/* ---------------------------------------------------------------------- */
.guest-navbar { background: var(--kt-navy); padding: 1rem 0; }
.guest-navbar .nav-link { color: #c9d1e6; font-weight: 700; }
.guest-navbar .nav-link:hover { color: #fff; }
.guest-navbar .brand { padding: 0; font-size: 1.3rem; }

.card { border: 1px solid var(--kt-line); border-radius: var(--kt-radius); box-shadow: var(--kt-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--kt-line); font-weight: 800; border-top-left-radius: var(--kt-radius) !important; border-top-right-radius: var(--kt-radius) !important; }
.list-group-item { border-color: var(--kt-line); }
.list-group-item-action:hover { background: #f7f9ff; }

.accordion-item { border: 1px solid var(--kt-line); border-radius: .9rem !important; overflow: hidden; margin-bottom: .6rem; }
.accordion-button { font-weight: 800; }
.accordion-button:not(.collapsed) { color: var(--kt-blue); background: #f0f3ff; box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: var(--kt-line); }

.alert { border: 1px solid transparent; border-radius: .9rem; font-weight: 700; }
.alert-success { background: #dff6ea; color: #158354; }
.alert-danger { background: #ffe5e2; color: #c84e44; }

.badge.bg-secondary { background: #e8eeff !important; color: #2852c6 !important; }
.badge.bg-danger { background: var(--kt-coral) !important; }

.btn-outline-secondary { border-color: var(--kt-line); color: var(--kt-ink); }
.btn-outline-secondary:hover { background: var(--kt-navy); border-color: var(--kt-navy); }

.pagination .page-link { border-color: var(--kt-line); color: var(--kt-ink); font-weight: 700; }
.pagination .page-item.active .page-link { background: var(--kt-blue); border-color: var(--kt-blue); }

/* ---------------------------------------------------------------------- */
/* Marketing landing page                                                  */
/* ---------------------------------------------------------------------- */
.lp-hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem); border-radius: 1.75rem; color: #fff; background: linear-gradient(135deg, #1a2b57 0%, #2c50b8 55%, #25b8d7 120%); box-shadow: 0 24px 60px rgba(21,37,75,.28); }
.lp-hero-copy h1, .lp-hero-copy p { color: #fff; }
.lp-hero-preview { color: var(--kt-ink); transition: opacity .2s ease, transform .2s ease; }
.lp-hero-preview p { color: var(--kt-ink); }
.lp-hero-preview.lp-quiz-fading { opacity: 0; transform: translateY(6px); }
.lp-quiz-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.lp-quiz-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s ease, transform .2s ease; }
.lp-quiz-dot:hover { background: rgba(255,255,255,.6); }
.lp-quiz-dot.active { background: var(--kt-yellow); transform: scale(1.25); }
.lp-hero .blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); border: 22px solid rgba(255,255,255,.07); }
.lp-hero .blob-1 { width: 280px; height: 280px; right: -80px; top: -100px; }
.lp-hero .blob-2 { width: 160px; height: 160px; left: -50px; bottom: -60px; }
.lp-hero .blob-3 { width: 90px; height: 90px; right: 18%; bottom: -30px; border-width: 14px; }
.lp-free-badge { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 900; font-size: .85rem; letter-spacing: .02em; backdrop-filter: blur(6px); }
.lp-free-badge i { color: var(--kt-yellow); }
.lp-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem 1.75rem; margin-top: 2.25rem; text-align: center; }
.lp-hero-stat strong { display: block; font-size: 1.6rem; font-weight: 900; }
.lp-hero-stat span { color: rgba(255,255,255,.8); font-size: .85rem; font-weight: 700; }

@media (min-width: 992px) {
  .lp-hero-stats { grid-template-columns: repeat(4, auto); text-align: left; justify-content: start; }
}

.lp-section-eyebrow { display: inline-flex; align-items: center; gap: .4rem; color: var(--kt-blue); background: #e8eeff; padding: .35rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }

.lp-feature-card { height: 100%; padding: 1.6rem; border: 1px solid var(--kt-line); border-radius: var(--kt-radius); background: #fff; box-shadow: var(--kt-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.lp-feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31,43,78,.12); }
.lp-feature-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; font-size: 1.4rem; margin-bottom: 1rem; color: var(--accent); background: var(--accent-soft); }

.lp-step { position: relative; height: 100%; padding: 1.6rem 1.4rem; border: 1px dashed var(--kt-line); border-radius: var(--kt-radius); background: #fff; }
.lp-step-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--kt-navy); color: var(--kt-yellow); font-weight: 900; margin-bottom: .9rem; }

@media (max-width: 991.98px) {
  .lp-step { text-align: center; }
  .lp-step-number { margin-left: auto; margin-right: auto; }
}

.lp-audience-card { height: 100%; padding: 1.75rem; border-radius: 1.4rem; color: #fff; position: relative; overflow: hidden; }
.lp-audience-card h3, .lp-audience-card p, .lp-audience-card li { color: #fff; }
.lp-audience-card.tone-schools { background: linear-gradient(140deg, #1c95c5, #3159d6); }
.lp-audience-card.tone-centres { background: linear-gradient(140deg, #ff9a6f, #ff5f7a); }
.lp-audience-card ul { list-style: none; padding-left: 0; margin-bottom: 1.25rem; }
.lp-audience-card ul li { margin-bottom: .4rem; font-weight: 600; display: flex; align-items: flex-start; gap: .5rem; }
.lp-audience-card ul li i { margin-top: .2rem; flex: 0 0 auto; }

.lp-testimonial { height: 100%; padding: 1.6rem; border-radius: var(--kt-radius); background: #fff; border: 1px solid var(--kt-line); box-shadow: var(--kt-shadow); }
.lp-testimonial .stars { color: var(--kt-yellow); margin-bottom: .6rem; }
.lp-testimonial-avatar { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; background: #e7edff; color: var(--kt-blue); }

.lp-cta-band { position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 3.25rem); border-radius: 1.75rem; text-align: center; color: #fff; background: linear-gradient(120deg, #15254b, #3563e9); box-shadow: 0 20px 46px rgba(21,37,75,.28); }
.lp-cta-band h2, .lp-cta-band p { color: #fff; }

.lp-faqlink-card { padding: 1.5rem; border-radius: var(--kt-radius); border: 1px solid var(--kt-line); background: #fff; display: flex; align-items: center; gap: 1rem; text-decoration: none; transition: .2s ease; }
.lp-faqlink-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(31,43,78,.1); }

@media (max-width: 575.98px) {
  .lp-hero { border-radius: 1.25rem; }
  .lp-hero-stats { gap: 1.1rem; }
  .lp-cta-band { border-radius: 1.25rem; }
}
