/* ============================================================
   MENTARI Monitor — Elegant Theme
   Palette: deep charcoal + warm gold, refined serif display
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0e1016;
  --bg-soft: #161925;
  --surface: #1b1f2e;
  --surface-2: #222738;
  --line: #2c3246;
  --line-soft: #242a3b;
  --text: #ecedf2;
  --text-dim: #a2a7b8;
  --text-mute: #717790;
  --gold: #d9b26a;
  --gold-soft: #e7cf9b;
  --gold-deep: #b8923f;
  --accent: #7ea2ff;
  --green: #5fd0a0;
  --red: #e3796f;
  --violet: #b79cff;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.75);
  --radius: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(217, 178, 106, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(126, 162, 255, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(14, 16, 22, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep));
  color: #1a1407; font-weight: 700; font-size: 19px;
  box-shadow: 0 8px 22px -10px rgba(217, 178, 106, 0.8);
  font-family: 'Cormorant Garamond', serif;
}
.brand .txt h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 700; letter-spacing: 0.3px; line-height: 1;
}
.brand .txt span { font-size: 11.5px; color: var(--text-mute); letter-spacing: 2px; text-transform: uppercase; }

.user-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 7px 6px 15px;
  border: 1px solid var(--line); border-radius: 100px;
  background: var(--surface);
}
.user-chip .info { text-align: right; line-height: 1.25; }
.user-chip .info b { font-size: 13px; font-weight: 600; }
.user-chip .info small { display: block; font-size: 11px; color: var(--text-mute); }
.user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, #2a3047, #363d58);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--gold-soft);
  border: 1px solid var(--line);
}

/* ---------- Page intro ---------- */
.intro { padding: 46px 0 28px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.intro h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.08; margin-top: 10px;
}
.intro h2 em { color: var(--gold); font-style: italic; }
.intro p { color: var(--text-dim); margin-top: 10px; max-width: 560px; }

/* ---------- Stats row ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 8px; }
.stat {
  background: linear-gradient(160deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.stat .k { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 700; color: var(--gold-soft); line-height: 1; }
.stat .l { font-size: 12px; color: var(--text-mute); margin-top: 7px; letter-spacing: 0.4px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin: 30px 0 20px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 220px; position: relative;
}
.search input {
  width: 100%; padding: 12px 16px 12px 42px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.search input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(217, 178, 106, 0.12); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }
.seg { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 4px; }
.seg button {
  border: none; background: transparent; color: var(--text-dim);
  font: inherit; font-size: 13px; padding: 7px 16px; border-radius: 100px; cursor: pointer; transition: .18s;
}
.seg button.active { background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep)); color: #1a1407; font-weight: 600; }

/* ---------- Course grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; padding-bottom: 60px; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 22px; cursor: pointer; overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s, box-shadow .22s;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft), transparent);
  opacity: .5; transition: opacity .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sks-badge {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; text-align: center; line-height: 1;
}
.sks-badge b { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--gold-soft); }
.sks-badge span { font-size: 9px; color: var(--text-mute); letter-spacing: 1px; }

.pill { font-size: 11px; padding: 4px 10px; border-radius: 100px; font-weight: 500; letter-spacing: .3px; white-space: nowrap; }
.pill.day { background: rgba(126,162,255,.12); color: var(--accent); border: 1px solid rgba(126,162,255,.22); }

.card h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 21px; font-weight: 700;
  line-height: 1.15; margin-bottom: 6px;
}
.card .dosen { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.card .dosen svg { color: var(--gold); flex-shrink: 0; }

.card .meta { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center; }
.card .meta .kode { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-mute); }
.card .go { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--gold); font-weight: 500; }
.card .go svg { transition: transform .2s; }
.card:hover .go svg { transform: translateX(3px); }
.sem-tag { font-size: 10px; color: var(--text-mute); letter-spacing: 1px; }

/* ---------- States ---------- */
.state { text-align: center; padding: 70px 20px; }
.state .ico { font-size: 40px; margin-bottom: 14px; }
.state h3 { font-family: 'Cormorant Garamond', serif; font-size: 24px; margin-bottom: 8px; }
.state p { color: var(--text-dim); max-width: 460px; margin: 0 auto 18px; }
.state.error { border: 1px solid rgba(227,121,111,.25); background: rgba(227,121,111,.06); border-radius: var(--radius); }
.state code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: 12px; color: var(--gold-soft); }

.skel { background: linear-gradient(165deg, var(--surface), var(--bg-soft)); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 22px; height: 190px; overflow: hidden; }
.skel .b { background: var(--surface-2); border-radius: 8px; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 11px 20px; border-radius: 100px; font: inherit; font-size: 14px; font-weight: 600;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep)); color: #1a1407; border: none;
}
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); font-weight: 500; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 13.5px; margin: 26px 0 0; }
.back:hover { color: var(--gold); }

.course-hero {
  margin: 20px 0 8px; padding: 30px 32px; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line-soft); position: relative; overflow: hidden;
}
.course-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(217,178,106,.14), transparent 70%); pointer-events: none;
}
.course-hero .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.course-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(26px,3.4vw,38px); font-weight: 700; line-height: 1.12; max-width: 760px; }
.course-hero .sub { color: var(--text-dim); margin-top: 10px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.course-hero .sub span { display: flex; align-items: center; gap: 7px; }
.course-hero .sub svg { color: var(--gold); }

.tabs { display: flex; gap: 6px; margin: 26px 0 20px; border-bottom: 1px solid var(--line-soft); }
.tabs button {
  border: none; background: none; color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 500;
  padding: 12px 18px; cursor: pointer; position: relative; border-radius: 10px 10px 0 0;
}
.tabs button.active { color: var(--gold-soft); }
.tabs button.active::after { content:''; position:absolute; left:14px; right:14px; bottom:-1px; height:2px; background: var(--gold); border-radius: 2px; }
.tabs button .n { font-size: 11px; color: var(--text-mute); margin-left: 5px; }

/* Pertemuan accordion */
.meeting { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.meeting > .head {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; transition: background .15s;
}
.meeting > .head:hover { background: var(--surface-2); }
.meeting .num {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-family:'Cormorant Garamond',serif; font-size: 18px; font-weight: 700; color: var(--gold-soft);
}
.meeting .head.general .num { background: rgba(217,178,106,.12); border-color: rgba(217,178,106,.3); }
.meeting .head .title { flex: 1; }
.meeting .head .title b { font-size: 15px; font-weight: 600; display: block; }
.meeting .head .title small { font-size: 12px; color: var(--text-mute); }
.meeting .head .chev { color: var(--text-mute); transition: transform .25s; }
.meeting.open .head .chev { transform: rotate(180deg); }
.meeting .body { display: none; padding: 4px 20px 18px 74px; }
.meeting.open .body { display: block; animation: fade .25s ease; }
@keyframes fade { from{opacity:0; transform: translateY(-4px)} to{opacity:1} }

.res { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.res:first-child { border-top: none; }
.res .ic {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.res .ic.c-quiz { color: var(--violet); } .res .ic.c-assign { color: var(--gold-soft); }
.res .ic.c-forum { color: var(--green); } .res .ic.c-link { color: var(--accent); } .res .ic.c-res { color: var(--text-dim); }
.res .rt { flex: 1; min-width: 0; }
.res .rt b { font-size: 14px; font-weight: 500; display: block; }
.res .rt small { font-size: 11.5px; color: var(--text-mute); }
.res .typ { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-mute); padding: 3px 9px; border: 1px solid var(--line); border-radius: 100px; }
.res a.open { color: var(--gold); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.res .locked { font-size: 11px; color: var(--red); display:flex; align-items:center; gap:5px; }

/* Peserta */
.peserta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.pcard .pav { width: 38px; height: 38px; border-radius: 50%; flex-shrink:0; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #1a1407; background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep)); }
.pcard .pn { min-width: 0; } .pcard .pn b { font-size: 13.5px; font-weight: 600; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pcard .pn small { font-size: 11.5px; color: var(--text-mute); font-family: ui-monospace,monospace; }

.rps { padding: 22px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.rps h4 { font-family:'Cormorant Garamond',serif; font-size: 20px; color: var(--gold-soft); margin-bottom: 10px; }
.rps p { color: var(--text-dim); font-size: 14.5px; }

/* ============================================================
   QUIZ PAGE
   ============================================================ */
.bulk {
  margin: 20px 0 26px; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line-soft);
}
.bulk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.bulk-head b { font-size: 15px; font-weight: 600; }
.bulk-head small { display: block; font-size: 12px; color: var(--text-mute); margin-top: 3px; max-width: 560px; }
.bulk-count { flex-shrink: 0; font-size: 12px; color: var(--gold-soft); background: var(--surface-2);
  border: 1px solid var(--line); padding: 5px 12px; border-radius: 100px; white-space: nowrap; }
.bulk textarea {
  width: 100%; resize: vertical; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 15px;
  line-height: 1.9; letter-spacing: 2px; text-transform: uppercase;
}
.bulk textarea:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(217,178,106,.12); }
.bulk textarea::placeholder { color: var(--text-mute); text-transform: none; letter-spacing: normal; font-size: 13px; line-height: 1.7; }
.bulk-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

.qlist { padding-bottom: 60px; }
.qcard {
  padding: 20px 22px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-soft);
  transition: border-color .18s;
}
.qcard.answered { border-color: rgba(217,178,106,.4); }
.qhead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.qnum {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 700; color: var(--gold-soft);
}
.qcard.answered .qnum { background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep)); color: #1a1407; border-color: transparent; }
.qtext { flex: 1; font-size: 15px; line-height: 1.5; padding-top: 3px; }
.qtext p { margin: 0; }

.opts { display: grid; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  background: var(--bg-soft); transition: .15s;
}
.opt:hover { border-color: var(--line); background: var(--surface-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.optlet {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.opttxt { font-size: 14px; line-height: 1.4; } .opttxt p { margin: 0; }
.opt.on { border-color: var(--gold); background: rgba(217,178,106,.1); }
.opt.on .optlet { background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep)); color: #1a1407; border-color: transparent; }

.grade-big {
  font-family: 'Cormorant Garamond', serif; font-size: 64px; font-weight: 700; line-height: 1;
  color: var(--gold-soft); margin: 4px 0 10px;
}
.grade-big small { display: block; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-mute); font-weight: 500; margin-top: 6px; }

/* ============================================================
   FORUM PAGE
   ============================================================ */
.composer {
  margin: 20px 0 10px; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line-soft);
}
.clabel { display: block; font-size: 12px; color: var(--text-mute); letter-spacing: .4px;
  text-transform: uppercase; margin: 14px 0 6px; }
.cinput {
  width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 14px;
}
textarea.cinput { resize: vertical; line-height: 1.6; }
select.cinput { appearance: none; cursor: pointer; }
.cinput:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(217,178,106,.12); }

.send-msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.send-msg.ok { color: var(--green); }
.send-msg.err { color: var(--red); }

.sec-title { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 700;
  margin: 30px 0 14px; }
.postlist { padding-bottom: 60px; }
.post {
  padding: 16px 18px; margin-bottom: 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.post .phead { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.post .pav {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #1a1407;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep));
}
.post .pmeta { flex: 1; min-width: 0; line-height: 1.3; }
.post .pmeta b { font-size: 14px; font-weight: 600; display: block; }
.post .pmeta small { font-size: 11.5px; color: var(--text-mute); }
.post .psmall { padding: 6px 14px; font-size: 12.5px; }
.post .ptitle { font-size: 14.5px; font-weight: 600; color: var(--gold-soft); margin-bottom: 6px; }
.post .pbody { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.post .pbody p { margin: 0 0 8px; } .post .pbody p:last-child { margin: 0; }

.hidden { display: none !important; }

footer { text-align: center; padding: 30px 0 40px; color: var(--text-mute); font-size: 12.5px; }
footer b { color: var(--gold-soft); font-family:'Cormorant Garamond',serif; }

/* responsive */
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .user-chip .info { display: none; }
  .meeting .body { padding-left: 20px; }
}
