/* LMS ARRAU — Clean Enterprise & Modern Executive Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&display=swap');

:root {
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --card2: #F4F4F5;
  --line: #E4E4E7;
  --line-strong: #D4D4D8;
  --txt: #18181B;
  --mut: #71717A;
  --acc: #0284C7;
  --acc2: #0F172A;
  --ok: #10B981;
  --warn: #F59E0B;
  --bad: #EF4444;
  --r: 12px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px -2px rgba(24,24,27,0.06);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg) !important;
  background: var(--bg) !important;
  color: var(--txt) !important;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--acc); text-decoration: none; font-weight: 500; transition: color 0.15s ease; }
a:hover { color: #0369A1; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
  color: var(--txt);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover {
  background: var(--card2);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
button.primary {
  background: var(--acc2) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(15,23,42,0.15);
}
button.primary:hover {
  background: #27272A !important;
  transform: translateY(-1px);
}
button.danger {
  background: #FEF2F2 !important;
  color: var(--bad) !important;
  border-color: #FCA5A5 !important;
}
button.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

input, select, textarea {
  width: 100%;
  padding: 11px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card) !important;
  color: var(--txt) !important;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-size: 12px; font-weight: 700; color: var(--mut); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: 0.4px; }

.hide { display: none !important; }

/* ============ LANDING ============ */
#landing { min-height: 100vh; position: relative; background: var(--bg); }
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 6vw;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--acc2);
  letter-spacing: -0.5px;
}
.nav .spacer { flex: 1; }

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 6vw 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { font-size: clamp(30px, 4.5vw, 50px); line-height: 1.15; font-weight: 800; color: var(--txt); margin-bottom: 16px; letter-spacing: -1px; }
.hero h1 .grad { color: var(--acc); }
.hero p { color: var(--mut); font-size: 16px; line-height: 1.6; margin-bottom: 24px; max-width: 520px; }
.heroBtns { display: flex; gap: 12px; flex-wrap: wrap; }
.heroBtns button { padding: 12px 24px; font-size: 15px; }

.feats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 6vw 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.feat .ic { font-size: 28px; margin-bottom: 12px; }
.feat b { display: block; margin-bottom: 6px; font-size: 16px; color: var(--txt); }
.feat span { color: var(--mut); font-size: 13.5px; line-height: 1.5; }

.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.mock .bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock .row { display: flex; align-items: center; gap: 10px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; font-size: 13px; }
.mock .row .ic { width: 26px; height: 26px; border-radius: 6px; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.mock .row .bar2 { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.mock .row .bar2>div { height: 100%; border-radius: 99px; background: var(--acc); }
.mock .chat { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; margin-top: 10px; }
.mock .chat .b { background: var(--card); border-radius: 8px; padding: 8px 11px; margin-top: 6px; color: var(--mut); line-height: 1.5; }

/* ============ LOGIN MODAL ============ */
#loginWrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 24, 27, 0.4);
  backdrop-filter: blur(8px);
}
.loginCard {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.logo { font-size: 32px; margin-bottom: 8px; text-align: center; }
.loginCard h1 { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 4px; color: var(--txt); }
.loginCard p.sub { text-align: center; color: var(--mut); font-size: 13px; margin-bottom: 20px; }
.loginCard .close { position: absolute; top: 14px; right: 14px; font-size: 18px; background: transparent; color: var(--mut); border: none; padding: 4px 8px; box-shadow: none; }
.loginCardWrap { position: relative; }
.hint { background: #F0F9FF; border: 1px solid #BAE6FD; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #0369A1; margin-top: 16px; line-height: 1.5; }
.err { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; display: none; }
.tabRow { display: flex; gap: 4px; background: var(--card2); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tabRow .tab { flex: 1; background: transparent; color: var(--mut); font-weight: 600; padding: 8px; border-radius: 8px; border: none; box-shadow: none; font-size: 13px; }
.tabRow .tab.active { background: var(--card); color: var(--txt); box-shadow: var(--shadow-sm); }

/* ============ APP LAYOUT ============ */
#app { display: none; min-height: 100vh; background: var(--bg); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .brand { font-weight: 800; font-size: 18px; color: var(--txt); white-space: nowrap; cursor: pointer; letter-spacing: -0.5px; }
.topbar .spacer { flex: 1; }
.chip { background: var(--card2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.chip b { color: var(--txt); }

.layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 60px); }
.sidebar { background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebar button { text-align: left; background: transparent; color: var(--mut); font-weight: 600; border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: none; box-shadow: none; }
.sidebar button:hover { background: var(--card2); color: var(--txt); }
.sidebar button.active { background: #F0F9FF; color: var(--acc); font-weight: 700; }
.sidebar button .ic { font-size: 16px; width: 20px; text-align: center; }
.sidebar .foot { margin-top: auto; font-size: 11.5px; color: var(--mut); padding: 12px; border-top: 1px solid var(--line); }

.main { padding: 32px 40px; max-width: 1100px; width: 100%; margin: 0 auto; }
.page-title { font-size: 24px; font-weight: 800; color: var(--txt); margin-bottom: 4px; letter-spacing: -0.5px; }
.page-sub { color: var(--mut); font-size: 14px; margin-bottom: 24px; }
.grid { display: grid; gap: 16px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 32px; font-weight: 800; color: var(--acc); letter-spacing: -1px; }
.stat .l { color: var(--mut); font-size: 13px; margin-top: 2px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--txt); }
.mut { color: var(--mut); font-size: 13.5px; }
.pbar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.pbar>div { height: 100%; background: var(--acc); border-radius: 99px; transition: width 0.4s ease; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; letter-spacing: 0.3px; }
.pill.admin { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.pill.student { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

/* Banner Pengumuman */
.annBanner { background: #F0F9FF; border: 1px solid #BAE6FD; border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: #0369A1; }
.annBanner .ic { font-size: 20px; }
.annBanner b { display: block; margin-bottom: 2px; color: #0C4A6E; }

/* Materi List */
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mitem { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; cursor: pointer; transition: all 0.15s ease; box-shadow: var(--shadow-sm); }
.mitem:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mitem .idx { width: 32px; height: 32px; border-radius: 8px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--acc); flex-shrink: 0; }
.mitem.done .idx { background: #ECFDF5; color: var(--ok); }
.mitem .t { font-weight: 700; font-size: 15px; color: var(--txt); }
.mitem .d { color: var(--mut); font-size: 13px; margin-top: 2px; }
.mitem .ck { margin-left: auto; color: var(--ok); font-weight: 800; flex-shrink: 0; }

/* Materi View */
.mview { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; max-width: 800px; box-shadow: var(--shadow-sm); }
.mview h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; color: var(--txt); letter-spacing: -0.5px; }
.mview .content { line-height: 1.7; font-size: 15px; color: #3F3F46; }
.mview .actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(24, 24, 27, 0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modalCard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.modalCard h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* Login Google center */
#login-container, .login-box, [id*=login], [class*=login] { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
div[id*=g_id_onload], div[class*=g_id_signin] { display: flex !important; justify-content: center !important; margin: 12px auto !important; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 8px; }
  .sidebar button { white-space: nowrap; }
  .sidebar .foot { display: none; }
  .main { padding: 20px 16px; }
  .topbar { padding: 0 16px; }
  .topbar .chip { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .mock { display: none; }
}
