:root {
  --bg: #f3f8ff;
  --card: #ffffff;
  --line: #d8e2f0;
  --text: #142033;
  --muted: #5e6b7f;
  --primary: #1565c0;
  --primary-2: #2e7dff;
  --success: #138a5a;
  --warning: #c27a12;
  --danger: #b33434;
  --shadow: 0 8px 30px rgba(16, 24, 40, 0.07);
  --radius: 20px;
  --radius-sm: 14px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.page-wrap {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 40px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 3px;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav a:hover {
  background: #eef5ff;
}

.nav a.active {
  background: var(--primary);
  color: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  margin-top: 32px;
}

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner p {
  margin: 0;
}

/* Typography */
.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 720px;
}

.kicker,
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.muted {
  color: var(--muted);
}

.m-top {
  margin-top: 18px;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card.soft {
  background:
    radial-gradient(circle at top right, rgba(46, 125, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

/* Layout helpers */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Buttons */
.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  filter: brightness(1.03);
}

.btn.secondary {
  background: #eef5ff;
  border-color: #cfe0fb;
  color: var(--primary);
}

.btn.secondary:hover {
  background: #e5f0ff;
}

.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover {
  background: #f8fbff;
}

/* Small meta chips */
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid #d5e6ff;
}

/* Feature boxes */
.feature-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.feature-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.feature-box strong {
  font-size: 1rem;
}

/* Level cards */
.level-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.04);
}

.level-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

/* Alerts */
.alert {
  margin-bottom: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
  border: 1px solid transparent;
}

.alert.success {
  background: #edf9f2;
  color: var(--success);
  border-color: #cfead8;
}

.alert.error {
  background: #fff1f1;
  color: var(--danger);
  border-color: #f3caca;
}

.alert.info {
  background: #eef5ff;
  color: var(--primary);
  border-color: #d4e4ff;
}

/* Forms */
.form-card {
  max-width: 560px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 700;
  font-size: 0.96rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8eb8ff;
  box-shadow: 0 0 0 4px rgba(46, 125, 255, 0.12);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.92rem;
  color: var(--muted);
  background: #f8fbff;
}

tr:hover td {
  background: #fcfdff;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge.success {
  background: #edf9f2;
  color: var(--success);
  border-color: #cfead8;
}

.badge.warning {
  background: #fff7ea;
  color: var(--warning);
  border-color: #f1deb6;
}

.badge.danger {
  background: #fff1f1;
  color: var(--danger);
  border-color: #f3caca;
}

.badge.info {
  background: #eef5ff;
  color: var(--primary);
  border-color: #d4e4ff;
}

/* Dashboard helpers */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 6px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e7eef8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 999px;
}

/* Utility */
.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .card,
  .feature-box,
  .level-card,
  .stat-card {
    padding: 18px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .lead {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
  }

  .nav a {
    padding: 9px 12px;
    font-size: 0.95rem;
  }
}