:root {
  --navy: #0f2a4a;
  --navy-2: #163a63;
  --blue: #2563eb;
  --gold: #d4af37;
  --gold-2: #f0d264;
  --gold-soft: #f9efce;
  --bg: #eef2f8;
  --bg-2: #e5ecf6;
  --card: #ffffff;
  --ink: #16233a;
  --muted: #64748b;
  --line: #e6ebf3;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --grad: linear-gradient(135deg, #0f2a4a 0%, #1e4d86 55%, #2f6fb3 100%);
  --grad-gold: linear-gradient(135deg, #f0d264 0%, #d4af37 100%);
  --grad-soft: linear-gradient(135deg, #eaf1ff 0%, #f6efe0 100%);
  --shadow: 0 10px 30px rgba(15, 42, 74, 0.12);
  --shadow-sm: 0 2px 10px rgba(15, 42, 74, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 42, 74, 0.24);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: thin; scrollbar-color: #c7d2e3 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #c7d2e3; border-radius: 8px; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: calc(90px + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--grad); color: #fff;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow); overflow: hidden; border-radius: 0 0 22px 22px;
}
.app-header::after {
  content: ""; position: absolute; top: -60%; right: -8%;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.30), transparent 68%); pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 11px; background: #fff; color: var(--navy);
  display: grid; place-items: center; font-weight: 800; font-size: 1rem; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-text h1 { font-size: 1.05rem; font-weight: 800; letter-spacing: .2px; }
.brand-sub { font-size: .74rem; opacity: .85; }
.brand-sem {
  display: inline-block; margin-top: 5px; font-size: .64rem; font-weight: 800; letter-spacing: .4px;
  color: var(--navy); background: var(--grad-gold); padding: 2px 10px; border-radius: 999px;
  box-shadow: 0 3px 8px rgba(212,175,55,.3);
}
.brand-sem[hidden] { display: none; }
.header-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy);
  border: 2px solid rgba(255,255,255,.5); font-weight: 800; font-size: .8rem; cursor: pointer;
  display: grid; place-items: center; transition: transform .12s ease;
}
.avatar-btn:hover { transform: translateY(-1px); }
.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff;
  font-size: .95rem; cursor: pointer; display: grid; place-items: center; transition: transform .12s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.notif-badge {
  position: absolute; top: -5px; right: -5px; background: var(--gold); color: var(--navy);
  font-size: .6rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--navy);
}
.notif-badge[hidden] { display: none; }
.notif-sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; margin: 10px 2px 6px; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; background: #fbfcfe; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; }
.notif-item.unread { background: #eef4ff; border-color: #d3e2fb; }
.notif-ic { font-size: 1.05rem; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-weight: 700; font-size: .9rem; color: var(--navy); }
.notif-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; word-break: break-word; }
.notif-time { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ---------- Main ---------- */
.app-main { padding: 14px 14px 28px; max-width: 760px; margin: 0 auto; overflow-x: hidden; }

/* ---------- Stat bar ---------- */
.stat-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat {
  position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.stat.accent::before { background: var(--grad-gold); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-num {
  font-size: 1.5rem; font-weight: 800; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.stat.accent .stat-num { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-lbl { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-ic { position: absolute; left: 12px; font-size: .9rem; opacity: .6; }
.search-wrap input {
  width: 100%; padding: 11px 12px 11px 36px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: .9rem; color: var(--ink); box-shadow: var(--shadow-sm);
}
.search-wrap input:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-left: 2px; }
.chips::-webkit-scrollbar { height: 0; display: none; }
.mk-filter {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: .88rem; color: var(--ink); box-shadow: var(--shadow-sm); font-family: inherit;
}
.mk-filter:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.mk-filter[hidden] { display: none; }
.chip {
  flex: 0 0 auto; background: var(--card); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .15s ease; white-space: nowrap;
}
.chip:hover { transform: translateY(-1px); }
.chip.is-active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(15,42,74,.28); }

/* ---------- View header (sekunder) ---------- */
.view-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.view-head h2 { font-size: 1.1rem; color: var(--navy); font-weight: 800; }
.view-head .sub { font-size: .76rem; color: var(--muted); }
.round-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--navy); font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm);
  flex: 0 0 auto; transition: transform .12s ease;
}
.round-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.ghost-btn {
  background: #fff; color: var(--navy); border: 1px solid var(--line); padding: 8px 14px;
  border-radius: 12px; font-size: .84rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, background .15s ease;
}
.ghost-btn:hover { transform: translateY(-1px); background: #f3f7ff; }
.add-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: var(--grad); color: #fff; border: none; }

/* ---------- Cards list ---------- */
.agenda-list { display: flex; flex-direction: column; gap: 12px; }
.mcard {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--blue);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease; animation: cardIn .3s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mcard.k-pertemuan { border-left-color: var(--blue); }
.mcard.k-kegiatan { border-left-color: var(--gold); }
.mcard.k-selesai { border-left-color: var(--green); opacity: .85; }
.mcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mcard-headmain { flex: 1; min-width: 0; }
.pill { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #1d4ed8; background: #e0edff; padding: 3px 10px; border-radius: 999px; margin-bottom: 7px; }
.k-kegiatan .pill { color: #92600a; background: #fef3c7; }
.k-selesai .pill { color: #166534; background: #dcfce7; }
.mcard-title { font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.mcard-date-badge {
  flex: 0 0 auto; text-align: center; background: var(--grad-gold); color: var(--navy);
  border-radius: 12px; padding: 6px 10px; min-width: 54px; box-shadow: 0 4px 10px rgba(212,175,55,.32);
}
.mcard-date-badge .d { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.mcard-date-badge .m { font-size: .62rem; text-transform: uppercase; letter-spacing: .5px; }
.mcard-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.mcard-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.flag.tugas { background: #fef3c7; color: #92600a; border-color: #f3dfa0; }
.flag.pres { background: #e0edff; color: #1d4ed8; border-color: #c7dbfb; }
.mcard-meta .mi { display: inline-flex; align-items: center; gap: 5px; }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.tag.mk { background: #e0e7ff; color: #3730a3; }
.tag.mode { background: #e0edff; color: #1d4ed8; }
.tag.cat { background: #ede9fe; color: #6d28d9; }
.tag.gold { background: #fef3c7; color: #92600a; }
.tag.green { background: #dcfce7; color: #166534; }
.tag.red { background: #fee2e2; color: #991b1b; }
.tag.blue { background: #e0edff; color: #1d4ed8; }

.empty { text-align: center; color: var(--muted); padding: 46px 20px; font-size: .9rem; }
.empty .big { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { font-size: 1rem; color: var(--navy); font-weight: 800; }
.cal-dow { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: .68rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-cell {
  min-height: 46px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  padding: 4px; font-size: .8rem; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  transition: transform .1s ease, background .18s ease;
}
.cal-cell.dim { opacity: .35; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-cell.selected { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 16px rgba(15,42,74,.3); }
.cal-cell.has-event { background: linear-gradient(180deg, #f1f6ff, #e9f1ff); }
.cal-cell.selected.has-event { background: var(--grad); }
.cal-cell .num { font-weight: 600; }
.cal-dots { display: flex; gap: 2px; margin-top: auto; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: block; }
.cal-cell.selected .cal-dots i { background: var(--gold-2); }
.day-panel { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.day-panel h3 { font-size: .9rem; color: var(--navy); }

/* ---------- FAB ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(92px + var(--safe-bottom));
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad); color: #fff; border: none;
  font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 12px 26px rgba(15,42,74,.42); z-index: 30;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease;
}
.fab:hover { transform: translateY(-2px) rotate(90deg); box-shadow: 0 16px 32px rgba(15,42,74,.5); }
.fab:active { transform: scale(.92) rotate(90deg); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom));
  width: min(94%, 460px); border: 1px solid var(--line); border-radius: 20px; padding: 5px; gap: 2px;
  display: grid; grid-template-columns: repeat(3,1fr); z-index: 25; overflow: hidden;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(12px); box-shadow: 0 12px 32px rgba(15,42,74,.18);
}
.tab {
  background: none; border: none; cursor: pointer; padding: 10px 4px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; color: var(--muted);
  transition: color .15s ease, background .2s ease, transform .12s ease;
}
.tab .ti { font-size: 1.2rem; }
.tab:active { transform: scale(.96); }
.tab.is-active { color: var(--navy); background: var(--grad-soft); }
.tab.is-active .ti { transform: translateY(-1px) scale(1.05); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(11,26,46,.5); backdrop-filter: blur(5px);
  display: grid; align-items: end; justify-items: center;
}
.modal-sheet {
  width: min(100%, 640px); max-height: 92vh; overflow-y: auto; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(24px + var(--safe-bottom)); box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
@media (min-width: 680px) { .modal-overlay { align-items: center; } .modal-sheet { border-radius: 22px; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-grip { width: 44px; height: 5px; background: var(--line); border-radius: 3px; margin: 6px auto 10px; }
.modal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-top h2 { font-size: 1.1rem; color: var(--navy); }
.modal-close { background: #f1f5fb; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 1rem; }
.modal-close:hover { color: var(--red); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font-size: .92rem;
  font-family: inherit; color: var(--ink); background: #fbfcfe; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.btn {
  flex: 1; background: var(--grad); color: #fff; border: none; border-radius: 12px; padding: 13px;
  font-size: .95rem; font-weight: 700; cursor: pointer; transition: transform .15s ease, filter .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 8px 18px rgba(15,42,74,.22);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn.gold { background: var(--grad-gold); color: var(--navy); }
.btn.ghost { background: #f1f5fb; color: var(--muted); box-shadow: none; flex: 0 0 auto; }
.btn.ghost:hover { color: var(--navy); }
.btn.sm { flex: 0 0 auto; padding: 8px 14px; font-size: .84rem; box-shadow: none; }

/* ---------- Semester group (Jadwal) ---------- */
.sem-group { margin-bottom: 20px; }
.sem-head {
  display: inline-block; background: var(--grad); color: #fff; font-weight: 800; font-size: .82rem;
  letter-spacing: .3px; padding: 6px 16px; border-radius: 999px; margin: 8px 0 2px; box-shadow: var(--shadow-sm);
}
.btn-icon {
  background: #f1f5fb; border: none; color: var(--muted); width: 34px; height: 34px; border-radius: 10px;
  cursor: pointer; font-size: .95rem; display: grid; place-items: center; flex: 0 0 auto;
}
.btn-icon:hover { color: var(--navy); background: #e6eefb; }
.btn-icon.danger:hover { color: var(--red); background: #fee2e2; }

/* ---------- Task item ---------- */
.task-item {
  display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--muted); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.task-item.p-tinggi { border-left-color: var(--red); }
.task-item.p-sedang { border-left-color: var(--amber); }
.task-item.p-rendah { border-left-color: var(--blue); }
.task-item.done { opacity: .62; }
.task-item.done .task-title { text-decoration: line-through; }
.task-check {
  width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  flex: 0 0 auto; margin-top: 2px; display: grid; place-items: center; color: transparent; font-size: .8rem; font-weight: 700;
}
.task-check:hover { border-color: var(--green); }
.task-item.done .task-check { background: var(--green); border-color: var(--green); color: #fff; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: .96rem; color: var(--navy); }
.task-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 6px; align-items: center; }
.task-meta .due.urgent { color: var(--red); font-weight: 700; }
.badge { font-size: .66rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.badge.tinggi { background: #fee2e2; color: var(--red); }
.badge.sedang { background: #fef3c7; color: #92600a; }
.badge.rendah { background: #e0edff; color: #1d4ed8; }
.task-actions { display: flex; gap: 6px; }
.mine-status { font-size: .82rem; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.mine-status.ok { color: var(--green); font-weight: 700; }
.progress { margin-top: 10px; }
.progress-bar { height: 8px; background: #eef2f8; border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #4fa17e); border-radius: 999px; }
.progress-meta { font-size: .74rem; color: var(--muted); margin-top: 5px; }
.expand-btn { background: none; border: none; color: var(--blue); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; margin-top: 8px; padding: 0; }
.sub-list { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sub-row { display: flex; align-items: center; gap: 10px; font-size: .84rem; padding: 6px 0; }
.sub-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: 0 0 auto; }
.sub-row.done .dot { background: var(--green); }
.sub-row .nm { font-weight: 600; }
.sub-row .meta { color: var(--muted); font-size: .76rem; margin-left: auto; display: flex; gap: 10px; align-items: center; }
.file-link { color: var(--blue); text-decoration: none; font-weight: 700; font-size: .8rem; }
.file-link:hover { text-decoration: underline; }
.file-input-row { display: flex; align-items: center; gap: 10px; }
.file-name-tag { font-size: .78rem; color: var(--muted); }

/* ---------- Grid cards (matkul/kelompok) ---------- */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.mk-card .mk-top { display: flex; justify-content: space-between; gap: 8px; }
.mk-card h3 { font-size: 1.02rem; color: var(--navy); margin: 10px 0 4px; }
.mk-card .dsn { font-size: .84rem; color: var(--muted); white-space: pre-wrap; }
.mk-card .sks { font-size: .68rem; font-weight: 700; color: #92600a; background: var(--gold-soft); padding: 3px 10px; border-radius: 999px; }
.mk-card .mk-foot { display: flex; gap: 8px; margin-top: 14px; }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.note-card { background: linear-gradient(180deg, #fffdf7, #fdf8ec); border: 1px solid #ece3cd; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.note-card h3 { color: var(--navy); margin-bottom: 6px; font-size: 1rem; }
.note-card p { font-size: .86rem; color: #5a5f6e; line-height: 1.55; white-space: pre-wrap; flex: 1; }
.note-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.note-date { font-size: .72rem; color: var(--muted); }

/* ---------- Pertemuan detail list (dalam kartu) ---------- */
.pt-tugas { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.pt-trow { display: flex; align-items: center; gap: 8px; font-size: .84rem; padding: 4px 0; }
.pt-trow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }

/* ---------- Login ---------- */
.login-screen {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(47,111,179,.55), transparent 60%),
    radial-gradient(800px 500px at 85% 90%, rgba(212,175,55,.28), transparent 55%),
    linear-gradient(135deg, #0b1f3a 0%, #122d52 45%, #0f2a4a 100%);
  overflow: hidden;
}
.login-screen::before, .login-screen::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
}
.login-screen::before { width: 320px; height: 320px; top: -120px; right: -80px; background: radial-gradient(circle, rgba(240,210,100,.22), transparent 70%); }
.login-screen::after { width: 360px; height: 360px; bottom: -140px; left: -100px; background: radial-gradient(circle, rgba(59,130,246,.25), transparent 70%); }
.login-card {
  position: relative; width: min(100%, 390px); background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.6); border-radius: 26px; padding: 34px 28px 26px; text-align: center;
  box-shadow: 0 30px 70px rgba(5,14,30,.45), inset 0 1px 0 rgba(255,255,255,.7); animation: slideUp .3s ease; backdrop-filter: blur(6px);
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 4px; border-radius: 0 0 6px 6px;
  background: var(--grad-gold);
}
.login-logo {
  position: relative; width: 84px; height: 84px; border-radius: 22px; margin: 2px auto 16px; background: #fff;
  display: grid; place-items: center; overflow: hidden; box-shadow: 0 10px 26px rgba(15,42,74,.22);
}
.login-logo::after { content: ""; position: absolute; inset: -4px; border-radius: 24px; padding: 2px; background: var(--grad-gold); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.login-card h1 { font-family: var(--font-display, inherit); font-size: 1.4rem; font-weight: 800; color: var(--navy); letter-spacing: .2px; }
.login-sub { font-size: .82rem; color: var(--muted); margin: 6px 0 22px; line-height: 1.5; }
.login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-field {
  display: flex; align-items: center; gap: 10px; background: #f4f7fb; border: 1.5px solid #e6ebf3;
  border-radius: 13px; padding: 2px 14px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.login-field:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.login-field .lf-ic { font-size: 1rem; opacity: .6; flex: 0 0 auto; }
.login-field input { flex: 1; border: none; background: transparent; outline: none; padding: 13px 0; font-size: .95rem; font-family: inherit; color: var(--ink); }
.login-btn { width: 100%; justify-content: center; margin-top: 6px; padding: 14px; font-size: 1rem; border-radius: 13px; }
.login-error { background: #fee2e2; color: var(--red); border-radius: 10px; padding: 9px 12px; font-size: .82rem; }
.login-foot { font-size: .72rem; color: var(--muted); margin-top: 20px; }
.login-hint { font-size: .78rem; color: var(--muted); margin-top: 14px; }

/* ---------- Account sheet ---------- */
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; background: var(--grad); border-radius: 18px; padding: 16px; box-shadow: 0 8px 22px rgba(15,42,74,.22); }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; background: var(--grad-gold); color: var(--navy); font-weight: 800; font-size: 1.25rem; display: grid; place-items: center; }
.account-name { font-size: 1.05rem; font-weight: 700; color: #fff; }
.account-id { font-size: .8rem; color: rgba(255,255,255,.88); margin-top: 3px; }
.account-id b { color: #fff; letter-spacing: .3px; }
.account-role { margin-top: 6px; }
.account-actions { display: flex; flex-direction: column; gap: 8px; }
.account-actions button {
  text-align: left; padding: 14px 15px; border-radius: 14px; background: #fbfcfe; color: var(--navy);
  border: 1px solid var(--line); font-size: .92rem; font-weight: 600; box-shadow: var(--shadow-sm); cursor: pointer;
  display: flex; align-items: center; gap: 10px;
}
.account-actions button:hover { background: #eef4ff; }
.account-actions button.danger { color: var(--red); }

/* ---------- Choice sheet (Tambah) ---------- */
.choice-grid { display: flex; flex-direction: column; gap: 10px; }
.choice-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: #fbfcfe; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.choice-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cdd9ee; }
.choice-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex: 0 0 auto; background: linear-gradient(135deg,#eaf1ff,#dce8fb); color: var(--navy); }
.choice-ic.alt { background: linear-gradient(135deg,#fdf3e0,#f6e4bf); }
.choice-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.choice-txt b { font-size: 1rem; color: var(--navy); }
.choice-txt small { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.choice-arrow { color: var(--muted); font-size: 1.15rem; flex: 0 0 auto; transition: transform .14s ease, color .14s ease; }
.choice-card:hover .choice-arrow { transform: translateX(3px); color: var(--blue); }

/* ---------- Detail sheet ---------- */
.detail-hero {
  display: flex; gap: 14px; align-items: center; background: var(--grad); border-radius: 16px;
  padding: 16px; color: #fff; box-shadow: 0 8px 22px rgba(15,42,74,.22); margin-bottom: 14px;
}
.dh-badge {
  background: var(--grad-gold); color: var(--navy); border-radius: 12px; padding: 8px 12px;
  text-align: center; min-width: 58px; flex: 0 0 auto; box-shadow: 0 4px 12px rgba(212,175,55,.4);
}
.dh-badge .d { font-size: 1.4rem; font-weight: 800; display: block; line-height: 1; }
.dh-badge .m { font-size: .64rem; text-transform: uppercase; letter-spacing: .5px; }
.dh-title { font-size: 1.1rem; font-weight: 800; line-height: 1.2; }
.dh-sub { font-size: .85rem; opacity: .92; margin-top: 3px; }
.info-list { background: #fbfcfe; border: 1px solid var(--line); border-radius: 14px; padding: 2px 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.info-row { display: grid; grid-template-columns: 32px 92px 1fr; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef1f6; font-size: .9rem; }
.info-row:last-child { border-bottom: none; }
.info-row .ic { width: 32px; height: 32px; border-radius: 9px; background: #eef4ff; display: grid; place-items: center; font-size: .95rem; }
.info-row .k { color: var(--muted); font-weight: 600; font-size: .8rem; }
.info-row .v { color: var(--ink); font-weight: 600; word-break: break-word; white-space: pre-wrap; }
.detail-sec h4 { font-size: .8rem; color: var(--navy); text-transform: uppercase; letter-spacing: .4px; margin: 4px 0 10px; }
.dtask { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dtask-row { display: flex; align-items: flex-start; gap: 10px; background: #fbfcfe; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.dtask-main { flex: 1; min-width: 0; }
.dtask-row .t { color: var(--ink); font-weight: 600; }
.dtask-pres { font-size: .78rem; color: var(--navy-2); margin-top: 5px; }
.dtask-badges { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; align-items: center; }
.dtask-empty { color: var(--muted); font-size: .85rem; padding: 6px 2px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(96px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: .86rem;
  z-index: 60; box-shadow: var(--shadow); max-width: 90%; animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Ringkas khusus HP (agenda & tugas) ---------- */
@media (max-width: 560px) {
  .stat-num { font-size: 1.3rem; }
  .agenda-list { gap: 10px; }
  .mcard { padding: 12px; border-left-width: 4px; border-radius: 14px; }
  .pill { font-size: .6rem; padding: 2px 9px; margin-bottom: 6px; }
  .mcard-title { font-size: .9rem; }
  .mcard-date-badge { padding: 5px 9px; min-width: 48px; border-radius: 11px; }
  .mcard-date-badge .d { font-size: 1.05rem; }
  .mcard-date-badge .m { font-size: .58rem; }
  .mcard-meta { font-size: .76rem; gap: 6px 12px; margin-top: 8px; }
  .mcard-flags { margin-top: 8px; }
  .flag { font-size: .68rem; padding: 3px 9px; }
  .task-item { padding: 11px; gap: 10px; margin-bottom: 10px; border-left-width: 4px; border-radius: 14px; }
  .task-title { font-size: .88rem; line-height: 1.3; }
  .task-meta { font-size: .75rem; gap: 6px 10px; margin-top: 5px; }
}
