/* TumbuhBareng builder 3: kelas, acara, pesan, beranda, cari.
   Hanya token style.css (--accent, --accent-soft, --accent-text, --line, --soft, --muted, --faint, --ink, --radius) + --danger dari app.css. */

/* ---------- umum ---------- */
.sec-bar { margin: 18px 0 14px; }
.iconbtn.sm { width: 32px; height: 32px; }
.iconbtn[disabled] { opacity: .4; cursor: not-allowed; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--soft); border-radius: 999px; }
.seg a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: #3a403d; }
.seg a:hover { color: var(--text); }
.seg a.on { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 1px 3px rgba(8,24,16,.12); }
.seg .cnt { font-size: 12px; color: var(--faint); }
.page-head + .seg { margin-bottom: 8px; }
.people-list { list-style: none; display: grid; }
.people-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.people-list li > span:not(.av) { flex: 1; min-width: 0; display: grid; }
.people-list li > .av { flex: none; }
.people-list strong { font-weight: 500; }
.people-list small { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-list .btn { flex: none; }

/* ---------- F10 kelas ---------- */
.kgrid { gap: 18px; }
.kwrap { display: grid; gap: 8px; align-content: start; }
.kcard .kcover { position: relative; display: block; }
.kcard .kcover img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; height: auto; }
.kcard.locked .kcover img { filter: grayscale(.6); opacity: .8; }
.kcard .klock { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(8,24,16,.35); }
.kcard .kfoot { display: grid; gap: 8px; margin-top: auto; padding-top: 6px; }
.kcard .kfoot .tag { justify-self: start; }
.kcard .kpct { color: var(--accent-text); font-weight: 600; }
.klock-reason { line-height: 1.45; }
.ktools { display: flex; align-items: center; gap: 6px; }
.ktools .tag { margin-right: auto; }
.kgroup + .kgroup { margin-top: 30px; }
.kgroup .subtitle { margin-bottom: 14px; }

.course { padding-top: 18px; }
.course .post-crumbs, .lesson .post-crumbs, .event-detail .post-crumbs { margin-bottom: 12px; }
.course-head { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.course-head > img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; height: auto; }
.course-head .progress { max-width: 420px; }
.lock-box { max-width: 520px; }
.outline { margin-top: 24px; display: grid; gap: 18px; }
.osec { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.osec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.osec-head .subtitle { font-size: 17px; }
.otools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.olist { list-style: none; margin-top: 10px; }
.olist li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.olist li > a, .olist .otitle { flex: 1; min-width: 0; }
.olist li > a:hover { color: var(--accent-text); }
.olist li.done > a { color: var(--muted); }
.ocheck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
li.done > .ocheck { background: var(--accent); border-color: var(--accent); color: #fff; }
li.done > .ocheck svg { width: 13px; height: 13px; }
.opad { padding: 10px 0 2px; }
.oadd { margin-top: 12px; }
.bab-add { grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.bab-add .field { margin: 0; }
.otools .more-dd .dd { width: 260px; }

.lesson { padding-top: 18px; display: grid; gap: 16px; }
.lesson .post-crumbs { margin-bottom: 0; }
.lesson-title { margin-top: -6px; }
.lesson-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lesson-nav .card { padding: 16px 18px; display: grid; gap: 4px; transition: border-color .15s; }
.lesson-nav .card:hover { border-color: var(--accent); }
.lesson-nav .card small { display: inline-flex; align-items: center; gap: 4px; }
.lesson-nav .card strong { font-weight: 500; }
.lesson-nav .next { text-align: right; }
.lesson-nav .next small { justify-content: flex-end; }
.course-side .progress { margin: 8px 0 14px; }
.cs-sec + .cs-sec { margin-top: 14px; }
.cs-sec h3 { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.cs-sec ol { list-style: none; }
.cs-sec li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.cs-sec li.on { background: var(--soft); font-weight: 500; }
.cs-sec li a { flex: 1; min-width: 0; }
.cs-sec li a:hover { color: var(--accent-text); }
.cs-sec .ocheck { width: 18px; height: 18px; }

/* ---------- F11 acara ---------- */
.events-page .sec-bar { margin-bottom: 8px; }
.ev-list { margin-top: 12px; }
.ev-row { grid-template-columns: 56px 1fr auto; }
.ev-row h5 a:hover { color: var(--accent-text); }
.ev-row .event-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ev-row.is-live .date { background: var(--accent); color: #fff; }
.event-meta .stack { display: inline-flex; }
.event-meta .stack img { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; }
.event-meta .stack img:first-child { margin-left: 0; }
.month { margin-top: 16px; }
.month-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.month-head .subtitle { min-width: 150px; text-align: center; }
.month-count { margin-left: auto; }
.mgrid { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mrowh, .mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mrowh span { padding: 10px 8px; font-size: 12px; font-weight: 500; color: var(--muted); text-align: center; background: var(--soft); }
.mcell { min-height: 92px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: grid; align-content: start; gap: 4px; min-width: 0; }
.mcell:first-child { border-left: 0; }
.mcell.pad { background: #fbfcfb; }
.mday { font-size: 13px; color: var(--muted); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.mcell.today .mday { background: var(--accent); color: #fff; font-weight: 600; }
.mev { display: block; font-size: 12px; line-height: 1.3; padding: 4px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mev:hover { background: var(--accent); color: #fff; }
.mev b { font-weight: 600; }
.m-agenda { display: none; list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.m-agenda li + li { border-top: 1px solid var(--line); }
.m-agenda a { display: grid; gap: 2px; padding: 12px 14px; }
.m-agenda a:hover strong { color: var(--accent-text); }
.m-agenda .ma-date { font-size: 12px; color: var(--accent-text); font-weight: 600; }
.m-agenda strong { font-weight: 500; font-size: 15px; line-height: 1.35; }
.m-agenda small { color: var(--muted); font-size: 13px; }
.event-detail { padding-top: 18px; display: grid; gap: 18px; }
.event-detail .post-crumbs { margin-bottom: 0; }
.ev-head { display: flex; gap: 16px; align-items: center; }
.date.lg { width: 70px; height: 76px; flex: none; }
.date.lg b { font-size: 26px; }
.ev-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 20px; }
.ev-facts > div { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.ev-facts > div > svg { color: var(--accent); margin-top: 3px; flex: none; }
.ev-facts b { display: block; font-weight: 500; font-size: 15px; }
.ev-facts small { display: block; color: var(--muted); font-size: 13px; word-break: break-word; }
.ev-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.people { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.people a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.people a:hover { border-color: var(--accent); }

/* ---------- F14 pesan ---------- */
.msg-start { margin-top: 26px; display: grid; gap: 14px; }
.conv-list { list-style: none; display: grid; }
.conv-list li { border-bottom: 1px solid var(--line); }
.conv-list li:first-child { border-top: 1px solid var(--line); }
.aside .conv-list li:first-child { border-top: 0; }
.conv-list a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; }
.conv-list a:hover, .conv-list li.on a { background: var(--soft); }
.cv-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cv-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-top small { font-size: 12px; flex: none; }
.cv-last { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-list li.unread .cv-last { color: var(--text); font-weight: 500; }
.cv-num { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; flex: none; }
.chat { display: grid; gap: 14px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.chat-head h1 a:hover { color: var(--accent-text); }
.chat-log { display: flex; flex-direction: column; gap: 8px; min-height: 280px; max-height: min(62vh, 640px); overflow-y: auto; padding: 6px 2px; overscroll-behavior: contain; }
.chat-empty { text-align: center; margin: auto; }
.chat-day { text-align: center; margin: 8px 0; }
.chat-day span { font-size: 12px; color: var(--muted); background: var(--soft); padding: 3px 10px; border-radius: 999px; }
.bubble { max-width: min(78%, 520px); align-self: flex-start; background: var(--soft); border-radius: 16px 16px 16px 4px; padding: 9px 14px 6px; }
.bubble.mine { align-self: flex-end; background: var(--accent-soft); border-radius: 16px 16px 4px 16px; }
.bubble .b-text { font-size: 15px; line-height: 1.5; word-break: break-word; }
.bubble .b-text p + p { margin-top: .5em; }
.bubble .b-text a { color: var(--accent-text); text-decoration: underline; }
.bubble time { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bubble.pending { opacity: .6; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px; resize: none; min-height: 48px; max-height: 160px; line-height: 1.45; }
.chat-form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-form .btn { height: 48px; }
.chat-note { margin-top: -6px; }

/* ---------- F15 beranda ---------- */
.welcome { margin-top: 22px; }
.rows-top { margin-top: 22px; }
.row h4 a:hover { color: var(--accent); }
.row .meta a.cat:hover { color: var(--accent-text); }
.pick h5 a:hover { color: var(--accent); }
.save.on { color: var(--accent); }
.save.on svg { fill: currentColor; }
.aside .rec img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.aside .rec .rec-name { min-width: 0; display: grid; font-size: 15px; line-height: 1.3; }
.aside .rec .rec-name a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.aside .rec .rec-name a:hover { color: var(--accent-text); }
.aside .rec small { color: var(--muted); font-size: 12px; }
.aside .rec .btn { flex: none; }
.sres { margin-top: 26px; }
.sres .between { margin-bottom: 12px; }
.sres .rows .row:first-child { border-top: 1px solid var(--line); }

@media (max-width: 1180px) {
  .course-head { grid-template-columns: 1fr; }
  .course-head > img { max-width: 320px; }
  .ev-facts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lesson-nav { grid-template-columns: 1fr; }
  .lesson-nav .next { text-align: left; }
  .lesson-nav .next small { justify-content: flex-start; }
  .mcell { min-height: 64px; padding: 4px 2px; }
  .mev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--accent); }
  .mev b { display: none; }
  .m-agenda { display: block; }
  .mrowh span { padding: 8px 2px; }
  .ev-row { grid-template-columns: 48px 1fr; }
  .ev-row .date { width: 48px; height: 54px; }
  .ev-row .ev-rsvp, .ev-row > .tag { grid-column: 2; justify-self: start; }
  .bab-add { grid-template-columns: 1fr; }
  .chat-log { max-height: 58vh; }
  .bubble { max-width: 88%; }
  .chat-form .btn span { display: none; }
  .hide-xs { display: none !important; }
  .seg { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { padding: 0 11px; font-size: 13px; white-space: nowrap; flex: none; }
  .people-list small { white-space: normal; }
  .ktools .tag { display: none; }
}
