:root {
  --nl-near-black: #050708;
  --nl-ink: #121C1E;
  --nl-slate: #1C2B2D;
  --nl-off-white: #F7F7F3;
  --nl-cloud: #F0F0F0;
  --nl-mid-gray: #89918D;
  --nl-light-gray: #CED4D1;
  --nl-green: #55D27D;
  --nl-emerald: #1E7842;
  --nl-forest: #16302A;
  --nl-mint: #7EE8A6;
  --nl-blue: #2D6DA5;
  --nl-orange: #C25E1A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Montserrat, Poppins, Arial, sans-serif;
  background: var(--nl-off-white);
  color: var(--nl-near-black);
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex: none;
  background: var(--nl-near-black);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; font-weight: 800; letter-spacing: .2px; }
.brand-mark { width: 18px; height: 18px; background: var(--nl-green); border-radius: 4px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav button {
  all: unset;
  cursor: pointer;
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--nl-light-gray);
  font-size: 14px;
  font-weight: 600;
}
.nav button:hover { background: var(--nl-ink); color: #fff; }
.nav button.active { background: var(--nl-ink); color: var(--nl-green); }

.sidebar-note {
  font-size: 12px;
  color: var(--nl-mid-gray);
  line-height: 1.5;
  padding: 12px 8px;
  border-top: 1px solid var(--nl-slate);
  margin-top: 12px;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: var(--nl-off-white);
  border-bottom: 1px solid var(--nl-light-gray);
}
.profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--nl-emerald); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.content { padding: 24px 28px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.crumb { font-size: 12px; color: var(--nl-mid-gray); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }

.course-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.course-title h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.course-meta { display: flex; align-items: center; gap: 8px; color: var(--nl-mid-gray); font-size: 14px; }
.badge { background: var(--nl-cloud); padding: 4px 10px; border-radius: 999px; font-weight: 700; color: var(--nl-near-black); }
.badge #level, .badge #target { color: var(--nl-emerald); }

.toolbar { display: flex; align-items: center; gap: 14px; }
.sync { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--nl-mid-gray); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nl-light-gray); }
.dot.live { background: var(--nl-green); }
.dot.error { background: var(--nl-orange); }

.btn { border: none; border-radius: 8px; padding: 10px 16px; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn.primary { background: var(--nl-near-black); color: #fff; }
.btn.primary:hover { background: var(--nl-ink); }
.btn.accent { background: var(--nl-green); color: var(--nl-near-black); }
.btn.accent:hover { background: var(--nl-mint); }

.tabpanel { display: none; flex: 1; min-height: 0; }
.tabpanel.active { display: flex; flex-direction: column; }

.workspace { display: flex; gap: 20px; flex: 1; min-height: 0; }
.doc { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--nl-light-gray); border-radius: 14px; overflow: hidden; }
.doc-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--nl-light-gray); }
.doc-title { font-weight: 700; font-size: 14px; }
.doc-sub { font-size: 12px; color: var(--nl-mid-gray); }

.viewer { position: relative; flex: 1; min-height: 480px; background: var(--nl-cloud); }
.viewer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer .fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.viewer .fallback img { max-width: 100%; max-height: 100%; }
.status-card { position: absolute; bottom: 10px; left: 10px; background: rgba(5,7,8,.75); color: #fff; font-size: 11px; padding: 5px 10px; border-radius: 999px; }
.hidden { display: none !important; }

.error-box { margin: 12px 18px; padding: 10px 12px; border-radius: 8px; background: #FCEEE3; color: var(--nl-orange); font-size: 13px; }

.side { width: 300px; flex: none; display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; border: 1px solid var(--nl-light-gray); border-radius: 14px; padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; }
.metric { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--nl-mid-gray); padding: 6px 0; }
.metric strong { color: var(--nl-near-black); font-size: 15px; }
.progress { height: 8px; background: var(--nl-cloud); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress span { display: block; height: 100%; width: 67%; background: var(--nl-green); }
.block { margin-bottom: 10px; }
.block-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nl-mid-gray); margin-bottom: 4px; }
.notice { font-size: 13px; color: var(--nl-mid-gray); line-height: 1.5; }

.meet-panel { flex: 1; display: flex; align-items: center; justify-content: center; }
.meet-card { text-align: center; background: var(--nl-near-black); border: 1px solid var(--nl-slate); border-radius: 16px; padding: 40px; max-width: 420px; }
.meet-card h2 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.meet-card p { color: var(--nl-mid-gray); font-size: 14px; margin-bottom: 20px; }

.meet-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--nl-green); margin-bottom: 20px; }
.meet-status .dot.live { background: var(--nl-green); box-shadow: 0 0 0 4px rgba(85,210,125,.18); }

.countdown-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 20px; }
.countdown-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown-ring circle { fill: none; stroke-width: 6; }
.countdown-ring .ring-bg { stroke: var(--nl-slate); }
.countdown-ring .ring-fg {
  stroke: var(--nl-green);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.countdown-ring span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #fff;
}
