/* =====================================================================
   Ruang Belajar PKBM Bina Karya — gaya tampilan
   ===================================================================== */

:root {
  --hijau:      #14775c;
  --hijau-tua:  #0d5642;
  --hijau-muda: #e6f4ef;
  --kuning:     #f2a900;
  --teks:       #1b2429;
  --teks-lembut:#5b6b73;
  --garis:      #e2e8ea;
  --latar:      #f5f7f8;
  --putih:      #ffffff;
  --merah:      #c02626;
  --biru:       #1d6fb8;
  --radius:     12px;
  --bayang:     0 1px 2px rgba(16,32,38,.06), 0 6px 20px rgba(16,32,38,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--teks);
  background: var(--latar);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--hijau); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 1em; }
.muted { color: var(--teks-lembut); font-size: .9rem; margin: 0; }
.center { text-align: center; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .58em 1.1em; border: 1px solid transparent; border-radius: 9px;
  background: var(--hijau); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--hijau-tua); text-decoration: none; color:#fff; }
.btn:active { transform: translateY(1px); }
.btn-sm  { padding: .38em .8em; font-size: .86rem; }
.btn-outline { background: transparent; border-color: var(--garis); color: var(--teks); }
.btn-outline:hover { background: #fff; border-color: var(--hijau); color: var(--hijau); }
.btn-ghost { background: transparent; color: var(--teks); }
.btn-ghost:hover { background: rgba(0,0,0,.05); color: var(--teks); }
.btn-danger { background: var(--merah); }
.btn-danger:hover { background: #99191a; }
.btn-kuning { background: var(--kuning); color: #3a2a00; }
.btn-kuning:hover { background: #d99700; color: #3a2a00; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Kartu & tabel ---------- */
.card {
  background: var(--putih); border: 1px solid var(--garis);
  border-radius: var(--radius); box-shadow: var(--bayang);
  padding: 1.15rem 1.25rem; margin-bottom: 1.1rem;
}
.card-head { display: flex; justify-content: space-between; align-items: center;
             gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-head h2, .card-head h3 { margin: 0; }

.tabel-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tabel { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
table.tabel th, table.tabel td { padding: .62rem .7rem; text-align: left; border-bottom: 1px solid var(--garis); vertical-align: top; }
table.tabel th { background: var(--hijau-muda); color: var(--hijau-tua); font-weight: 650; white-space: nowrap; }
table.tabel tbody tr:hover { background: #fafcfb; }
table.tabel td.aksi { white-space: nowrap; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label.f { display: block; font-weight: 600; font-size: .87rem; margin-bottom: .3rem; color: #3b4a51; }
input[type=text], input[type=password], input[type=email], input[type=date],
input[type=time], input[type=number], input[type=url], input[type=datetime-local],
input[type=file], select, textarea {
  width: 100%; padding: .58em .7em; border: 1px solid var(--garis);
  border-radius: 9px; font: inherit; background: #fff; color: var(--teks);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--hijau); box-shadow: 0 0 0 3px rgba(20,119,92,.15);
}
textarea { min-height: 96px; resize: vertical; }
.form-aksi { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* ---------- Alert & badge ---------- */
.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem;
         border: 1px solid; font-size: .92rem; }
.alert-sukses { background: #e8f6f0; border-color: #a9dcc9; color: #0d5642; }
.alert-error  { background: #fdecec; border-color: #f3bcbc; color: #8f1d1d; }
.alert-info   { background: #eaf3fb; border-color: #b8d6ef; color: #17527f; }

.badge { display: inline-block; padding: .12em .6em; border-radius: 999px;
         font-size: .73rem; font-weight: 700; letter-spacing: .02em; }
.badge-admin { background: #f3e3ff; color: #6b21a8; }
.badge-guru  { background: #e0efff; color: #17527f; }
.badge-siswa { background: var(--hijau-muda); color: var(--hijau-tua); }
.badge-meet  { background: #e6f0ff; color: #1a56b8; }
.badge-zoom  { background: #e6f4ff; color: #0b6ea8; }
.badge-lainnya { background: #eee; color: #444; }
.badge-abu   { background: #eef1f2; color: #566; }
.badge-merah { background: #fdecec; color: #a11; }
.badge-hijau { background: var(--hijau-muda); color: var(--hijau-tua); }
.badge-kuning{ background: #fff3d6; color: #8a5b00; }

/* ---------- Topbar & sidebar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem 1rem; background: var(--hijau); color: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.18);
  display: grid; place-items: center; font-size: .82rem; letter-spacing: .04em;
}
.brand-text { font-size: 1rem; white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar-right .btn-outline { border-color: rgba(255,255,255,.45); color: #fff; }
.topbar-right .btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color:#fff; }
.topbar-right .btn-ghost { color: #fff; }
.topbar-right .btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-size: .85rem; }
.who .badge { font-size: .66rem; }

.burger { display: none; background: none; border: 0; padding: .3rem; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; border-radius: 2px; }

.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
.sidebar {
  position: sticky; top: 48px; height: calc(100vh - 48px);
  padding: 1rem .7rem; background: var(--putih); border-right: 1px solid var(--garis);
  overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem .7rem; border-radius: 9px; color: #40525a; font-weight: 550;
  font-size: .92rem; margin-bottom: .15rem;
}
.nav-item:hover { background: var(--hijau-muda); color: var(--hijau-tua); text-decoration: none; }
.nav-item.is-active { background: var(--hijau); color: #fff; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--garis); margin-left: 5px; }
.nav-sep { height: 1px; background: var(--garis); margin: .8rem .3rem; }

.content { padding: 1.3rem 1.5rem 3rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start;
             gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--garis); border-radius: var(--radius);
        padding: .95rem 1.05rem; box-shadow: var(--bayang); }
.stat .angka { font-size: 1.75rem; font-weight: 700; color: var(--hijau-tua); line-height: 1.1; }
.stat .label { font-size: .82rem; color: var(--teks-lembut); }

/* ---------- Daftar kelas online ---------- */
.meet-list { display: grid; gap: .8rem; }
.meet-item { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
             border: 1px solid var(--garis); border-radius: var(--radius); padding: .85rem 1rem; background: #fff; }
.meet-item.segera { border-color: var(--kuning); background: #fffdf5; }
.meet-waktu { min-width: 92px; }
.meet-waktu .jam { font-size: 1.15rem; font-weight: 700; color: var(--hijau-tua); }
.meet-waktu .tgl { font-size: .78rem; color: var(--teks-lembut); }
.meet-isi { flex: 1 1 220px; min-width: 0; }
.meet-isi h3 { margin: 0 0 .15rem; }

/* ---------- Halaman depan ---------- */
.publik-nav { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem;
              background: #fff; border-bottom: 1px solid var(--garis); position: sticky; top: 0; z-index: 30; }
.publik-nav .brand { color: var(--hijau-tua); }
.publik-nav .brand-mark { background: var(--hijau); color: #fff; }
.publik-nav .sp { margin-left: auto; }

.hero { background: linear-gradient(135deg, var(--hijau-tua), var(--hijau) 60%, #1b9c78);
        color: #fff; padding: 3.4rem 1.5rem 3.6rem; }
.hero-in { max-width: 980px; margin: 0 auto; }
.hero h1 { font-size: 2.15rem; margin-bottom: .5rem; max-width: 20ch; }
.hero p { font-size: 1.03rem; opacity: .93; max-width: 58ch; }
.hero .btn-kuning { margin-top: .6rem; }

.seksi { max-width: 980px; margin: 0 auto; padding: 2.2rem 1.5rem; }
.fitur { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; }
.fitur .card { margin: 0; }
.fitur .ikon { width: 40px; height: 40px; border-radius: 10px; background: var(--hijau-muda);
               color: var(--hijau); display: grid; place-items: center; margin-bottom: .6rem; }
.fitur .ikon svg { width: 21px; height: 21px; }

.footer-publik { background: #102b24; color: #cfe3dc; padding: 1.8rem 1.5rem; font-size: .88rem; }
.footer-publik a { color: #9fd8c4; }
.footer-in { max-width: 980px; margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Halaman login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
              background: linear-gradient(135deg, #0d5642, #14775c 55%, #1b9c78); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
              padding: 1.9rem 1.7rem; box-shadow: 0 18px 50px rgba(0,0,0,.24); }
.login-card h1 { font-size: 1.3rem; margin-bottom: .2rem; }
.login-card .logo { width: 52px; height: 52px; border-radius: 14px; background: var(--hijau);
                    color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: .9rem; }
.login-card .f-row { margin-bottom: .8rem; }
.akun-demo { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--garis);
             font-size: .8rem; color: var(--teks-lembut); }
.akun-demo code { background: var(--latar); padding: .05em .35em; border-radius: 4px; }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 48px; left: 0; bottom: 0; width: 232px; z-index: 45;
    transform: translateX(-100%); transition: transform .2s ease; height: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .burger { display: block; }
  .content { padding: 1rem 1rem 3rem; }
  .form-grid { grid-template-columns: 1fr; }
  .who { display: none; }
  .hero h1 { font-size: 1.7rem; }
  .topbar { gap: .5rem; padding: .5rem .7rem; }
  .brand-text { font-size: .95rem; }
  .brand-mark { width: 28px; height: 28px; font-size: .74rem; }
  .topbar-right { gap: .3rem; }
  .topbar-right .btn-sm { padding: .34em .6em; font-size: .8rem; }
  .page-head h1 { font-size: 1.28rem; }
  .meet-item { gap: .6rem; }
  .meet-waktu { min-width: 80px; }
}
@media (max-width: 400px) {
  .brand-text { display: none; }
}
@media print {
  .topbar, .sidebar, .page-actions, .btn { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  body { background: #fff; }
}
