:root {
  --bg: #f6f8fc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #16a34a;
  --orange: #f97316;
  --rose: #e11d48;
  --sidebar: #101828;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { text-decoration: none; }
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 20%, rgba(37,99,235,.18), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(249,115,22,.18), transparent 28%),
    linear-gradient(135deg, #eef8ff 0%, #fff7ed 100%);
}
.auth-card {
  width: min(100%, 560px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(15,23,42,.14);
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--orange));
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 270px;
  background: var(--sidebar);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 18px 14px;
  overflow-y: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.sidebar-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  padding: 4px;
}
.nav-link-app {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  padding: 11px 12px;
  border-radius: 8px;
  margin: 3px 0;
  font-weight: 650;
}
.nav-link-app:hover, .nav-link-app.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(8,145,178,.95));
}
.notif-badge,
.mobile-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.notif-pill {
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-logout {
  margin-top: auto;
  background: rgba(225,29,72,.16);
  color: #fecdd3;
}
.main {
  margin-left: 270px;
  width: calc(100% - 270px);
  min-height: 100vh;
  padding-bottom: 92px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246,248,252,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.content { padding: 22px; }
.page-title { font-weight: 800; margin: 0; }
.cardx {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15,23,42,.06);
}
.stat {
  padding: 18px;
  border-left: 5px solid var(--blue);
}
.stat.full-blue { color:#fff; background: linear-gradient(135deg,#2563eb,#0891b2); border-left:0; }
.stat.full-green { color:#fff; background: linear-gradient(135deg,#16a34a,#22c55e); border-left:0; }
.stat.full-orange { color:#fff; background: linear-gradient(135deg,#f97316,#f59e0b); border-left:0; }
.stat.full-rose { color:#fff; background: linear-gradient(135deg,#e11d48,#f43f5e); border-left:0; }
.stat.full-blue,
.stat.full-green,
.stat.full-orange,
.stat.full-rose {
  position: relative;
  overflow: hidden;
}
.stat.full-blue::after,
.stat.full-green::after,
.stat.full-orange::after,
.stat.full-rose::after {
  content: "";
  position: absolute;
  inset: auto -35px -45px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.stat[class*="full-"] .text-muted { color: rgba(255,255,255,.78) !important; }
.stat.green { border-left-color: var(--green); }
.stat.orange { border-left-color: var(--orange); }
.stat.rose { border-left-color: var(--rose); }
.stat .num { font-size: 30px; font-weight: 850; }
.btn-gradient {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}
.btn-gradient:hover { color: #fff; filter: brightness(.95); }
.table thead th {
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f8fafc;
}
.badge-soft {
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}
.badge-soft.green { background: #dcfce7; color: #166534; }
.badge-soft.orange { background: #ffedd5; color: #9a3412; }
.badge-soft.rose { background: #ffe4e6; color: #9f1239; }
.mobile-nav {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  background: rgba(15,23,42,.96);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(15,23,42,.32);
}
.mobile-nav a {
  flex: 1;
  color: #cbd5e1;
  text-align: center;
  padding: 7px 2px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
}
.mobile-nav a.active { color: #fff; background: rgba(37,99,235,.92); }
.mobile-nav i { display:block; font-size: 19px; margin-bottom: 2px; }
.page-pengumuman .content > .row.g-3 > .col-lg-6 { flex: 0 0 100%; max-width: 100%; }
.page-dashboard .content .row.g-3:has(.announcement-strip) > .col-md-4 { flex: 0 0 100%; max-width: 100%; }
.avatar-photo { overflow: hidden; padding: 0; }
.avatar-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mobile-icon-wrap {
  position: relative;
  display: inline-block;
}
.mobile-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
}
.attendance-pad {
  background: linear-gradient(135deg, #0f172a, #1d4ed8 52%, #0891b2);
  color: #fff;
  padding: 22px;
  border-radius: 8px;
}
.clock {
  font-size: clamp(36px, 10vw, 66px);
  font-weight: 900;
  line-height: 1;
}
.fab-install {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 50;
  display: none;
}
.modal-minimal {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15,23,42,.28);
}
.modal-header, .modal-footer { border-color: #eef2f7; }
.bulk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(150px, auto)) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.filter-bar.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}
.filter-bar.report-filter {
  grid-template-columns: minmax(170px, auto) minmax(150px, auto) minmax(180px, auto) minmax(180px, 1fr) auto;
}
#studentsList .filter-bar {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(150px, auto)) auto;
  gap: 10px;
  width: 100%;
}
#studentsList .filter-bar input,
#studentsList .filter-bar select {
  min-width: 0;
}
#studentsList .filter-bar button { white-space: nowrap; }
.ajax-loading {
  opacity: .58;
  pointer-events: none;
  transition: opacity .2s ease;
}
.announcement-strip {
  min-height: 130px;
  border-radius: 8px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #2563eb 55%, #06b6d4);
  box-shadow: 0 14px 34px rgba(37,99,235,.22);
}
.stat-card-mini {
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid #e2e8f0;
}
.report-identity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.report-identity > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.report-identity strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.report-identity span {
  display: block;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.chat-partners { min-height: 460px; }
.chat-partner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  border: 1px solid transparent;
}
.chat-partner:hover,
.chat-partner.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.chat-partner small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.chat-box { overflow: hidden; }
.chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}
.chat-thread {
  min-height: 350px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 18px;
  background: #f8fafc;
}
.chat-row {
  display: flex;
  margin-bottom: 10px;
}
.chat-row.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: min(76%, 560px);
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}
.chat-row.mine .chat-bubble {
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
  border-color: transparent;
}
.chat-bubble small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.chat-row.mine .chat-bubble small { color: rgba(255,255,255,.75); }
.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; width: 100%; }
  .topbar { padding: 12px 14px; }
  .content { padding: 14px; }
  .mobile-nav { display: flex; }
  .hide-mobile { display: none !important; }
  .table-responsive { font-size: 13px; }
  .report-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar.report-filter { grid-template-columns: 1fr; }
  #studentsList .filter-bar { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .report-identity { grid-template-columns: 1fr; }
}
