/* SALAM - STAIS Darussalam · Tema hijau modern */
:root {
  --g-900: #073d22;
  --g-800: #0b5e34;
  --g-700: #0f7a3d;
  --g-600: #16924b;
  --g-500: #1fa95a;
  --g-100: #e6f4ec;
  --gold: #f4c430;
  --blue: #1565c0;
  --ink: #1d2433;
  --muted: #6b7588;
  --bg: #f3f5f7;
  --card: #ffffff;
  --line: #e7eaef;
  --radius: 18px;
  --bs-success: #0f7a3d;
  --bs-success-rgb: 15, 122, 61;
  --bs-link-color: #0f7a3d;
  --bs-link-color-rgb: 15, 122, 61;
  --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--bs-body-font-family); font-size: .92rem; padding-bottom: 76px; min-height: 100vh; }
@media (min-width: 992px) { body { padding-bottom: 0; } }
a { color: var(--g-700); text-decoration: none; }
.min-w-0 { min-width: 0; }
.btn-success { --bs-btn-bg: var(--g-700); --bs-btn-border-color: var(--g-700); --bs-btn-hover-bg: var(--g-800); --bs-btn-hover-border-color: var(--g-800); --bs-btn-active-bg: var(--g-900); }
.btn-outline-success { --bs-btn-color: var(--g-700); --bs-btn-border-color: var(--g-700); --bs-btn-hover-bg: var(--g-700); --bs-btn-hover-border-color: var(--g-700); }
.text-bg-success { background-color: var(--g-700) !important; }
.form-control:focus, .form-select:focus { border-color: var(--g-500); box-shadow: 0 0 0 .2rem rgba(31,169,90,.15); }
.form-check-input:checked { background-color: var(--g-700); border-color: var(--g-700); }
.page-link { color: var(--g-700); }
.active > .page-link { background: var(--g-700); border-color: var(--g-700); }
.nav-pills .nav-link.active { background: var(--g-700); }
.nav-pills .nav-link { color: var(--ink); }
.card { border-radius: var(--radius); border-color: var(--line); }
.card.shadow-sm { box-shadow: 0 4px 18px rgba(16,24,40,.05) !important; }
.table { --bs-table-bg: transparent; }
.table > thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { border-color: #f0f2f5; }
.card > .table-responsive:first-child { border-radius: var(--radius); }
.modal-content { border-radius: 20px; border: 0; }

/* ---------- Topbar ---------- */
.app-topbar { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 0; }
.app-topbar .brand { font-weight: 800; color: var(--g-800); letter-spacing: .04em; margin-right: 10px; }
.topbar-title { font-weight: 700; font-size: 1.02rem; }
.topbar-sub { font-size: .75rem; color: var(--muted); }
.btn-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-size: 1.25rem; background: transparent; border: 0; }
.btn-icon:hover { background: var(--g-100); color: var(--g-800); }
.badge-dot { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e53935; color: #fff; font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--g-100); }
.app-main { padding-top: 18px; padding-bottom: 28px; }
.app-footer { text-align: center; color: var(--muted); font-size: .75rem; padding: 18px 0 26px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h4 { font-weight: 700; }
.section-title { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-size: 1rem; margin: 26px 0 14px; }
.section-title::before { content: ''; width: 4px; height: 26px; background: currentColor; border-radius: 2px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,.04); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: .68rem; color: var(--muted); gap: 1px; padding: 4px 12px; border-radius: 12px; }
.bottom-nav a i { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--g-700); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px 30px; }
.dash-top { background: #fff; border-radius: 0 0 26px 26px; padding: 18px 0 16px; box-shadow: 0 4px 20px rgba(0,0,0,.03); }
.dash-top .inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 14px; }
.dash-photo { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.dash-hello { color: var(--muted); font-size: .9rem; }
.dash-name { font-weight: 800; font-size: 1.35rem; line-height: 1.15; display: flex; align-items: center; gap: 6px; }
.dash-name .sun { color: var(--gold); font-size: 1.2rem; }
.role-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; padding: 2px 10px; border-radius: 20px; background: var(--g-100); color: var(--g-800); font-weight: 600; margin-right: 4px; }
.hero-card { position: relative; overflow: hidden; border-radius: 26px; padding: 26px; color: #fff; margin-top: 18px;
  background: linear-gradient(135deg, var(--g-900) 0%, var(--g-700) 55%, var(--g-500) 100%); box-shadow: 0 14px 30px rgba(11,94,52,.28); }
.hero-card::before, .hero-card::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-card::before { width: 220px; height: 220px; right: -60px; top: -60px; }
.hero-card::after { width: 160px; height: 160px; left: -50px; bottom: -70px; }
.hero-label { letter-spacing: .18em; font-weight: 700; font-size: .82rem; display: flex; align-items: center; gap: 10px; opacity: .95; }
@media (max-width: 420px) { .hero-card .hero-date { display: inline-block; font-size: .8rem; padding: 6px 14px; border-radius: 18px; } .hero-title { font-size: 1.4rem; } }
.hero-date { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 30px; padding: 6px 16px; font-weight: 600; margin: 14px 0 10px; font-size: .9rem; }
.hero-title { font-size: 1.65rem; font-weight: 800; line-height: 1.2; position: relative; }
.hero-sub { opacity: .9; margin: 6px 0 18px; position: relative; }
.hero-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--g-800); font-weight: 700; border-radius: 40px; padding: 13px; font-size: 1rem; }
.hero-btn:hover { color: var(--g-900); background: #f4fbf6; }
.stat-strip { background: #fff; border-radius: 22px; padding: 14px; margin-top: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.04); display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat-item { padding: 8px 12px; border-radius: 14px; background: #f8faf9; }
.stat-item .v { font-weight: 800; font-size: clamp(.95rem, 4.2vw, 1.25rem); color: var(--g-800); overflow-wrap: anywhere; }
.stat-item .l { font-size: .72rem; color: var(--muted); }
.search-box { position: relative; margin-top: 22px; }
.search-box input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 40px; padding: 15px 20px 15px 54px; font-size: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.03); outline: none; }
.search-box input:focus { border-color: var(--g-500); }
.search-box i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; color: var(--muted); }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
@media (min-width: 576px) { .menu-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 992px) { .menu-grid { grid-template-columns: repeat(8, 1fr); } }
.menu-item { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--ink); font-weight: 600; font-size: .8rem; line-height: 1.25; padding: 6px 2px; border-radius: 16px; transition: transform .15s, background .15s; }
.menu-item:hover { background: #fff; transform: translateY(-2px); color: var(--g-800); }
.menu-item img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 8px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.08)); }
.quick-row { display: flex; gap: 22px; margin-top: 22px; overflow-x: auto; padding-bottom: 4px; }
.quick-row .menu-item { min-width: 86px; }
.fab-bot { position: fixed; right: 20px; bottom: 92px; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #12a66a, #0b7a4a); color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(11,122,74,.4); z-index: 1040; border: 0; }
@media (min-width: 992px) { .fab-bot { bottom: 28px; } }
.bot-panel { position: fixed; right: 20px; bottom: 166px; width: min(360px, calc(100vw - 40px)); max-height: 60vh; background: #fff; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.2); z-index: 1041; display: none; flex-direction: column; overflow: hidden; }
@media (min-width: 992px) { .bot-panel { bottom: 104px; } }
.bot-panel.show { display: flex; }
.bot-head { background: var(--g-700); color: #fff; padding: 12px 16px; font-weight: 700; }
.bot-body { padding: 12px; overflow-y: auto; flex: 1; font-size: .85rem; }
.bot-msg { background: #f1f5f3; border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; }
.bot-msg.me { background: var(--g-100); margin-left: 40px; text-align: right; }
.bot-input { display: flex; border-top: 1px solid var(--line); }
.bot-input input { flex: 1; border: 0; padding: 12px; outline: none; }
.bot-input button { border: 0; background: none; color: var(--g-700); padding: 0 14px; font-size: 1.2rem; }

/* ---------- Komponen umum ---------- */
.empty-state { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: 8px; color: #c5ccd6; }
.color-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #ddd; vertical-align: middle; }
.kpi { border-radius: var(--radius); padding: 16px; background: #fff; border: 1px solid var(--line); height: 100%; }
.kpi .v { font-size: 1.6rem; font-weight: 800; color: var(--g-800); line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .78rem; }
.kpi i { font-size: 1.5rem; color: var(--g-600); }
.profile-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.photo-46 { width: 120px; height: 180px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f5f5f5; }
.map-box { height: 380px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.cropper-wrap { max-height: 60vh; }
.cropper-wrap img { max-width: 100%; display: block; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f2f5; }
.notif-item.unread { background: #f3fbf6; }
.notif-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.15rem; }
.tab-scroll { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
.nilai-input { width: 90px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell { min-height: 84px; background: #fff; border-radius: 10px; padding: 4px 6px; font-size: .75rem; border: 1px solid var(--line); }
.cal-cell.muted { opacity: .4; }
.cal-cell.today { border-color: var(--g-600); box-shadow: inset 0 0 0 1px var(--g-600); }
.cal-ev { display: block; border-radius: 6px; padding: 1px 5px; color: #fff; margin-top: 2px; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-head { text-align: center; font-weight: 600; color: var(--muted); font-size: .75rem; }
@media (max-width: 576px) { .cal-cell { min-height: 56px; } .cal-ev { font-size: .6rem; } }
.login-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 20% 10%, rgba(31,169,90,.35), transparent 40%), radial-gradient(circle at 90% 90%, rgba(244,196,48,.25), transparent 40%), linear-gradient(160deg, var(--g-900), var(--g-700)); }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 28px; padding: 34px 28px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.login-card .form-control { border-radius: 14px; padding: 12px 14px; }
.login-card .btn { border-radius: 14px; padding: 12px; font-weight: 700; }
.dist-badge { font-size: 1rem; padding: 8px 14px; border-radius: 30px; }
