:root {
  --green: #0F8A5F;
  --green-600: #0C7852;
  --green-700: #096044;
  --green-900: #063A2A;
  --mint: #E9F6EF;
  --mint-2: #D6EDE1;
  --lime: #7BD389;
  --amber: #E9A23B;
  --red: #D9534F;
  --blue: #2F80ED;
  --purple: #7B61FF;
  --bg: #F4F8F5;
  --card: #FFFFFF;
  --ink: #0C2A21;
  --ink-2: #274B3E;
  --muted: #6C8779;
  --line: #E3EDE7;
  --shadow-sm: 0 1px 2px rgba(12, 42, 33, .05), 0 2px 8px rgba(12, 42, 33, .04);
  --shadow: 0 4px 16px rgba(12, 42, 33, .07), 0 1px 3px rgba(12, 42, 33, .05);
  --shadow-lg: 0 18px 40px rgba(12, 42, 33, .12);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-full: 999px;
  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-600); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img, svg { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.b { font-weight: 700; }
.semibold { font-weight: 600; }
.nowrap { white-space: nowrap; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16.5px; }
p { color: var(--ink-2); }
.lead { font-size: 15px; color: var(--muted); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green) 0%, var(--green-700) 100%);
  color: #fff; box-shadow: 0 6px 14px rgba(15, 138, 95, .28);
}
.brand-name { font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card-lg { padding: 22px; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 15.5px; }
.card-h .link { font-size: 12.5px; font-weight: 600; color: var(--green); display: flex; align-items: center; gap: 4px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 8px; text-align: center; box-shadow: var(--shadow-sm); transition: .18s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 92px;
}
.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--mint-2); }
.tile-ico {
  width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 14px; display: grid; place-items: center;
  background: var(--mint); color: var(--green-700);
}
.tile-lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: var(--green); color: #fff; transition: .16s; border: 1px solid transparent;
  box-shadow: 0 6px 16px rgba(15, 138, 95, .22);
}
.btn:hover { background: var(--green-600); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--mint); border-color: var(--mint-2); }
.btn-soft { background: var(--mint); color: var(--green-700); box-shadow: none; }
.btn-soft:hover { background: var(--mint-2); }
.btn-sm { padding: 8px 13px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-danger { background: #FDECEA; color: var(--red); box-shadow: none; }
.btn-danger:hover { background: #FAD9D6; }

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #FBFDFC; transition: .15s; font-size: 14px; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 4px rgba(15, 138, 95, .09); }
.textarea { min-height: 90px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236C8779' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.err { background: #FDECEA; color: #A63A36; padding: 10px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.ok-msg { background: var(--mint); color: var(--green-700); padding: 10px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; background: var(--mint); color: var(--green-700); }
.pill-amber { background: #FDF3E3; color: #9A6512; }
.pill-red { background: #FDECEA; color: #A63A36; }
.pill-blue { background: #EAF2FE; color: #1F5FBF; }
.pill-gray { background: #F0F4F1; color: #5F7A6D; }
.chip { padding: 6px 12px; border-radius: var(--r-full); border: 1.5px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.chip:hover { border-color: var(--mint-2); background: var(--mint); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- auth ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff;
}
.auth-hero {
  position: relative; padding: 44px 48px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 110% at 0% 0%, #12A16F 0%, #0C7A54 45%, #06432F 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 10%, rgba(255,255,255,.14) 0, transparent 45%),
                    radial-gradient(circle at 10% 90%, rgba(123,211,137,.18) 0, transparent 40%);
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { background: rgba(255,255,255,.16); backdrop-filter: blur(6px); box-shadow: none; }
.auth-hero h1 { font-size: 34px; line-height: 1.15; margin-bottom: 14px; letter-spacing: -.03em; }
.auth-hero p { color: rgba(255,255,255,.82); font-size: 14.5px; max-width: 470px; }
.hero-points { display: grid; gap: 12px; margin-top: 26px; max-width: 470px; }
.hero-point { display: flex; gap: 11px; align-items: flex-start; }
.hero-point .dot { width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: none; }
.hero-point b { font-size: 13px; display: block; }
.hero-point span { font-size: 12px; color: rgba(255,255,255,.72); }
.hero-art { margin-top: 28px; }
.auth-foot { font-size: 11.5px; color: rgba(255,255,255,.62); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-box { width: 100%; max-width: 400px; }
.tabs { display: flex; background: #F1F6F3; border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.tabs button { flex: 1; padding: 9px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.demo-box { margin-top: 22px; padding: 14px; border-radius: 12px; background: #F7FAF8; border: 1px dashed var(--line); }
.demo-box b { font-size: 12px; display: block; margin-bottom: 6px; }
.demo-cred { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 3px 0; }
.demo-cred code { font-family: ui-monospace, Menlo, monospace; color: var(--ink-2); font-size: 11px; }

/* ---------- student app ---------- */
.app-top {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-top-in { max-width: 1000px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--mint-2), #BCE0CC); color: var(--green-900);
  font-weight: 800; font-size: 13px; flex: none; border: 2px solid #fff; box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.app-main { max-width: 1000px; margin: 0 auto; padding: 18px 18px 110px; }
.hero-card {
  border-radius: var(--r-lg); padding: 20px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 150% at 100% 0%, #14A472 0%, #0C7A54 55%, #075139 100%);
  box-shadow: 0 14px 34px rgba(9, 96, 68, .28);
}
.hero-card::after {
  content: ''; position: absolute; right: -40px; bottom: -70px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.hero-card .hi { font-size: 12px; color: rgba(255,255,255,.72); font-weight: 600; letter-spacing: .02em; }
.hero-card h2 { font-size: 21px; margin: 2px 0 12px; }
.ring-wrap { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring-lbl { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 12px; }
.section-title h3 { font-size: 16px; }
.section-title a { font-size: 12px; font-weight: 700; color: var(--green); }

.unit-card {
  display: flex; gap: 13px; align-items: center; padding: 13px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: .16s; width: 100%; text-align: left;
}
.unit-card:hover { border-color: var(--mint-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.unit-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--mint); color: var(--green-700); flex: none; }
.unit-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.unit-title { font-weight: 700; font-size: 14px; line-height: 1.3; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; color: #8AA296; font-size: 10px; font-weight: 600; }
.bottom-nav button.on { color: var(--green); }
.bottom-nav button.on svg { transform: translateY(-1px); }
.bottom-nav svg { transition: .15s; }

/* ---------- questionnaire ---------- */
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.q-progress { height: 7px; background: var(--mint); border-radius: 99px; overflow: hidden; }
.q-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: 99px; transition: width .3s; }
.q-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.q-item:last-child { border-bottom: none; }
.q-text { font-size: 13.5px; font-weight: 600; line-height: 1.45; margin-bottom: 10px; }
.likert { display: flex; gap: 6px; }
.likert button {
  flex: 1; padding: 8px 4px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; transition: .14s;
}
.likert button:hover { border-color: var(--mint-2); background: #F8FCFA; }
.likert button.on { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 10px rgba(15,138,95,.2); }

/* ---------- misc components ---------- */
.bar { height: 8px; border-radius: 99px; background: #EDF3EF; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .4s; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; }
.kv + .kv { border-top: 1px solid #F1F6F3; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 700; text-align: right; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 15px; box-shadow: var(--shadow-sm); }
.stat .num { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mint); color: var(--green-700); }
.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green-900); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px;
  font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-bg { position: fixed; inset: 0; background: rgba(8, 30, 23, .45); backdrop-filter: blur(3px); z-index: 300; display: grid; place-items: center; padding: 18px; }
.modal { background: #fff; border-radius: 20px; padding: 22px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto; }

/* ---------- charts ---------- */
.radar-wrap { display: grid; place-items: center; padding: 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-top: 8px; }
.legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: block; }
.gauge { position: relative; width: 170px; height: 105px; margin: 0 auto; }
.gauge-lbl { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.gauge-lbl b { font-size: 27px; font-weight: 800; letter-spacing: -.03em; display: block; line-height: 1; }
.gauge-lbl span { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- admin panel ---------- */
.panel { display: grid; grid-template-columns: 246px 1fr; min-height: 100vh; }
.side {
  background: #0A241B; color: #D5E6DD; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand-name { color: #fff; }
.side .brand-sub { color: rgba(213,230,221,.5); }
.side-group { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(213,230,221,.38); font-weight: 700; margin: 16px 10px 6px; }
.nav-i {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #A9C2B6; width: 100%; text-align: left; transition: .14s;
}
.nav-i:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-i.on { background: linear-gradient(100deg, rgba(15,138,95,.95), rgba(12,122,84,.6)); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.nav-i .badge { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.14); padding: 1px 7px; border-radius: 99px; }
.main { background: var(--bg); min-width: 0; }
.main-top {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 12px 26px; display: flex; align-items: center; gap: 14px;
}
.main-body { padding: 22px 26px 60px; max-width: 1320px; }
.page-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.page-sub { font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
thead th {
  text-align: left; padding: 11px 14px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: #F7FAF8; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid #F1F6F3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FBFDFC; }
.num-cell { font-variant-numeric: tabular-nums; font-weight: 600; }
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 0; }
.step { flex: 1; min-width: 120px; position: relative; padding-top: 30px; text-align: center; }
.step::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 3px; background: var(--line); }
.step:first-child::before { left: 50%; }
.step:last-child::before { right: 50%; }
.step .dot {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px;
  border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1;
}
.step.done .dot { background: var(--green); border-color: var(--green); }
.step.ongoing .dot { background: #fff; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(233,162,59,.16); }
.step .lbl { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.step .sub { font-size: 10px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px 34px; }
  .auth-hero h1 { font-size: 25px; }
  .hero-points { display: none; }
  .hero-art { display: none; }
  .auth-form { padding: 26px 20px 40px; align-items: flex-start; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 80; transform: translateX(-100%);
    transition: .25s; height: 100vh;
  }
  .side.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .main-top { padding: 10px 14px; }
  .main-body { padding: 16px 14px 60px; }
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
@media (min-width: 901px) {
  .only-mobile { display: none !important; }
}
@media (max-width: 900px) {
  .only-desktop { display: none !important; }
}
