/* =========================================================
   RAPORT ASTS — Design System
   Direplikasi dari referensi UI (React+Tailwind) menjadi CSS
   biasa (tanpa build step), karena project ini CodeIgniter 3
   murni. Token warna & radius menyamai referensi persis.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
	--primary: #087443;
	--primary-dark: #075B35;
	--primary-light: #E8F5EE;
	--primary-verylight: #F4FAF6;
	--gold: #D9A441;
	--gold-light: #FBF3E4;
	--bg: #F7F9F8;
	--ink: #1F2937;
	--muted: #6B7280;
	--border: #E5E7EB;
	--danger: #DC2626;
	--danger-light: #FEF2F2;
	--blue: #2563EB;
	--blue-light: #EFF6FF;
	--amber: #D97706;
	--amber-light: #FFFBEB;
	--radius-card: 16px;
	--radius-btn: 10px;
	--shadow-card: 0 1px 3px 0 rgba(0,0,0,0.04), 0 1px 2px 0 rgba(0,0,0,0.03);
	--shadow-card-hover: 0 4px 12px 0 rgba(0,0,0,0.06), 0 2px 4px 0 rgba(0,0,0,0.04);
	--shadow-soft: 0 2px 8px 0 rgba(8,116,67,0.08);
	--sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Plus Jakarta Sans', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}

.icon { width: 18px; height: 18px; flex-shrink: 0; }

a { color: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ---------- Login ---------- */
.login-shell { min-height: 100vh; display: flex; }
.login-brand {
	display: none; width: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	position: relative; overflow: hidden; color: #fff;
}
@media (min-width: 1024px) { .login-brand { display: flex; align-items: center; } }
.login-brand-inner { position: relative; z-index: 1; padding: 0 5rem; max-width: 560px; }
.login-brand .blob1 { position: absolute; top: -8rem; right: -6rem; width: 24rem; height: 24rem; background: rgba(255,255,255,0.06); border-radius: 999px; filter: blur(50px); }
.login-brand .blob2 { position: absolute; bottom: -6rem; left: -4rem; width: 20rem; height: 20rem; background: rgba(217,164,65,0.12); border-radius: 999px; filter: blur(50px); }
.login-brand-logo { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2.5rem; }
.login-brand-logo .box { width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.login-brand-logo .box .icon { width: 28px; height: 28px; }
.login-brand-logo h1 { font-size: 1.4rem; font-weight: 800; margin: 0; letter-spacing: 0.02em; }
.login-brand-logo p { font-size: 0.85rem; margin: 0; color: rgba(255,255,255,0.7); }
.login-brand h2 { font-size: 2rem; font-weight: 800; line-height: 1.25; margin: 0 0 1rem; }
.login-brand > .login-brand-inner > p.lead { color: rgba(255,255,255,0.7); font-size: 1rem; line-height: 1.6; margin: 0 0 2.5rem; max-width: 30rem; }
.login-feature { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 1.1rem; }
.login-feature .box { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-feature .box .icon { width: 20px; height: 20px; }
.login-feature p.t { font-weight: 600; font-size: 0.9rem; margin: 0; }
.login-feature p.d { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin: 0.15rem 0 0; }
.login-copyright { font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 3rem; }

.login-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; background: var(--bg); }
.login-form-box { width: 100%; max-width: 380px; }
.login-mobile-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
@media (min-width: 1024px) { .login-mobile-logo { display: none; } }
.login-mobile-logo .box { width: 48px; height: 48px; border-radius: 16px; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.login-mobile-logo .box .icon { width: 24px; height: 24px; color: #fff; }
.login-mobile-logo h1 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.login-mobile-logo p { font-size: 0.75rem; color: var(--muted); margin: 0; }
.login-form-box h2 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.login-form-box > p.sub { font-size: 0.88rem; color: var(--muted); margin: 0.3rem 0 2rem; }
.login-input-wrap { position: relative; }
.login-input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.login-input-wrap input { padding-left: 44px !important; }
.login-demo-hint { margin-top: 1.5rem; padding: 0.75rem 1rem; border-radius: 12px; background: var(--primary-verylight); border: 1px solid var(--primary-light); font-size: 0.78rem; color: var(--muted); text-align: center; }
.login-demo-hint b { color: var(--primary); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
	width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border);
	flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
	display: flex; flex-direction: column; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 0.75rem; padding: 1.15rem 1.15rem; border-bottom: 1px solid var(--border); }
.sidebar-brand .box { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-brand .box .icon { width: 20px; height: 20px; color: #fff; }
.sidebar-brand h1 { font-size: 0.85rem; font-weight: 800; margin: 0; line-height: 1.2; }
.sidebar-brand p { font-size: 0.68rem; color: var(--muted); margin: 0; line-height: 1.2; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.2rem; }
.nav-link {
	display: flex; align-items: center; gap: 0.7rem; padding: 0.62rem 0.85rem; border-radius: 12px;
	font-size: 0.85rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: all .15s;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link .icon { width: 18px; height: 18px; }

.sidebar-user { border-top: 1px solid var(--border); padding: 0.75rem; }
.sidebar-user-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem; margin-bottom: 0.4rem; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.sidebar-user-row .name { font-size: 0.85rem; font-weight: 600; margin: 0; line-height: 1.2; }
.sidebar-user-row .role { font-size: 0.72rem; color: var(--muted); margin: 0; }
.nav-link.logout { color: var(--danger); }
.nav-link.logout:hover { background: var(--danger-light); color: var(--danger); }

.sidebar-toggle {
	display: none; position: fixed; top: 12px; left: 12px; z-index: 50;
	background: #fff; border: 1px solid var(--border); color: var(--muted); border-radius: 10px;
	width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer;
}
.sidebar-overlay { display: none; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.5rem; }
.topbar-titles p.crumb { font-size: 0.72rem; color: var(--muted); margin: 0; }
.topbar-titles h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.topbar-period { margin-left: auto; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.topbar-period strong { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.topbar-iconbtn {
	width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
	display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; text-decoration: none;
}
.topbar-iconbtn:hover { color: var(--primary); border-color: rgba(8,116,67,0.3); }
.topbar-profile { display: flex; align-items: center; gap: 0.6rem; padding-left: 0.75rem; border-left: 1px solid var(--border); }
.topbar-profile .name { font-size: 0.85rem; font-weight: 600; margin: 0; line-height: 1.2; }
.topbar-profile .role { font-size: 0.72rem; color: var(--muted); margin: 0; }

.content { padding: 1.5rem; max-width: 1400px; }
@media (min-width: 1024px) { .content { padding: 1.5rem 2rem; } }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); transition: all .2s; }
.card-hover:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.card-pad { padding: 1.25rem; }
.card-pad-lg { padding: 1.5rem; }

.card-hero {
	background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff;
	border-radius: var(--radius-card); padding: 1.5rem; position: relative; overflow: hidden; margin-bottom: 1.5rem;
}
.card-hero .blob { position: absolute; top: 0; right: 0; width: 16rem; height: 16rem; background: rgba(255,255,255,0.06); border-radius: 999px; filter: blur(40px); transform: translate(30%,-45%); }
.card-hero .eyebrow { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin: 0; position: relative; }
.card-hero h1 { font-size: 1.4rem; font-weight: 800; margin: 0.25rem 0 0; position: relative; }
.card-hero p.sub { color: rgba(255,255,255,0.75); margin: 0.35rem 0 0; position: relative; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4,1fr); } }
.stat-card { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card .label { font-size: 0.82rem; color: var(--muted); font-weight: 500; margin: 0; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; margin: 0.15rem 0 0; }
.stat-card .sublabel { font-size: 0.72rem; color: var(--muted); margin: 0.15rem 0 0; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon .icon { width: 20px; height: 20px; }
.c-green .value { color: var(--primary); } .c-green .stat-icon { background: var(--primary-light); color: var(--primary); }
.c-gold .value { color: var(--gold); } .c-gold .stat-icon { background: var(--gold-light); color: var(--gold); }
.c-blue .value { color: var(--blue); } .c-blue .stat-icon { background: var(--blue-light); color: var(--blue); }
.c-red .value { color: var(--danger); } .c-red .stat-icon { background: var(--danger-light); color: var(--danger); }
.c-gray .value { color: var(--muted); } .c-gray .stat-icon { background: #F3F4F6; color: var(--muted); }

/* ---------- Quick actions ---------- */
.qa-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
@media (min-width: 768px) { .qa-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1280px) { .qa-grid { grid-template-columns: repeat(5,1fr); } }
.qa-card {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
	padding: 1rem; text-align: left; display: block; text-decoration: none; color: inherit; transition: all .2s;
}
.qa-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.qa-card .qa-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; }
.qa-card h3 { font-size: 0.85rem; font-weight: 700; margin: 0 0 0.35rem; }
.qa-card p { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin: 0 0 0.6rem; }
.qa-card .go { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.qa-card .go .icon { width: 14px; height: 14px; }

/* ---------- Page header ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.5rem; }
.page-header-left { display: flex; align-items: center; gap: 0.85rem; }
.page-header-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.page-header h1 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.page-header .sub { font-size: 0.85rem; color: var(--muted); margin: 0.15rem 0 0; }
.page-header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
	padding: 0.55rem 1.05rem; border-radius: var(--radius-btn); border: none; cursor: pointer;
	font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: all .15s; line-height: 1.3;
	background: var(--primary); color: #fff; box-shadow: var(--shadow-soft);
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:active { transform: scale(0.98); }
.btn-secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); box-shadow: none; }
.btn-secondary:hover { background: var(--primary-light); color: var(--primary); }
.btn-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #FECACA; box-shadow: none; }
.btn-danger:hover { background: #FEE2E2; color: var(--danger); }
.btn-ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: #F3F4F6; color: var(--ink); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.78rem; }
.btn-icon-only { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label.label, .form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--ink); }
.form-row .hint, label .hint { font-weight: 400; color: var(--muted); font-size: 0.76rem; }
input[type=text], input[type=number], input[type=date], input[type=password],
input[type=email], input[type=file], select, textarea {
	width: 100%; padding: 0.62rem 0.9rem; border-radius: var(--radius-btn); border: 1px solid var(--border);
	background: #fff; color: var(--ink); font-size: 0.88rem; font-family: inherit; transition: all .15s;
}
input:focus, select:focus, textarea:focus {
	outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,116,67,0.15);
}
textarea { min-height: 90px; resize: vertical; }
.form-row { margin-bottom: 0.9rem; }
.form-actions { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-wrap { position: relative; }
.search-wrap .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap input { padding-left: 40px; }

.form-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1.25rem 1.5rem; max-width: 560px; margin-bottom: 1.25rem; }
.form-box.wide { max-width: 100%; }

/* Toolbar / add-bar: form ringkas di atas tabel */
.add-bar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.add-bar h2 { font-size: 0.85rem; font-weight: 700; margin: 0 0 0.75rem; color: var(--ink); display: flex; align-items: center; gap: 0.4rem; }
.add-bar h2 .icon { width: 16px; height: 16px; color: var(--primary); }
.add-bar form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.add-bar .f { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; font-weight: 600; }
.add-bar .f small { font-weight: 400; color: var(--muted); }
.add-bar details summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 0.85rem; list-style: none; }
.add-bar details summary::-webkit-details-marker { display: none; }
.add-bar details summary:before { content: '▸ '; color: var(--primary); }
.add-bar details[open] summary:before { content: '▾ '; }
.add-bar details[open] summary { margin-bottom: 0.85rem; }
.filter-bar { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 0.9rem; font-size: 0.85rem; flex-wrap: wrap; }
.filter-bar .icon { width: 16px; height: 16px; color: var(--muted); }
.check-row { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-weight: 400; margin: 0.5rem 0; }

/* ---------- Table (DataTable) ---------- */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow-x: auto; overflow-y: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
	padding: 0.85rem 1rem; text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--muted);
	text-transform: uppercase; letter-spacing: 0.04em; background: var(--primary-verylight); white-space: nowrap;
}
.data-table td { padding: 0.85rem 1rem; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover td { background: rgba(244,250,246,0.7); }
.table-wrap-scroll { overflow-x: auto; }

/* Tabel padat untuk data lebar (banyak kolom mapel) + kolom No/Nama lengket
   saat digeser horizontal, supaya tetap tahu baris itu milik siapa. */
.data-table-compact { font-size: 0.78rem; }
.data-table-compact th, .data-table-compact td { padding: 0.55rem 0.65rem; white-space: nowrap; }
.data-table-compact th { font-size: 0.65rem; }
.sticky-col-1, .sticky-col-2 { position: sticky; background: #fff; z-index: 1; }
.sticky-col-1 { left: 0; min-width: 36px; }
.sticky-col-2 { left: 36px; min-width: 110px; white-space: normal !important; box-shadow: 2px 0 4px -2px rgba(0,0,0,0.08); }
thead .sticky-col-1, thead .sticky-col-2 { background: var(--primary-verylight); z-index: 2; }

/* Tabel Monitoring: semua kolom mapel lebar sama rata, judul boleh 2 baris */
.monitor-table { table-layout: fixed; width: 100%; }
.monitor-table th:not(.sticky-col-1) { width: 80px; font-size: 0.6rem; line-height: 1.25; white-space: normal; padding: 0.5rem 0.3rem; }
.monitor-table td:not(.sticky-col-1) { padding: 0; }
.monitor-cell-sent {
	display: block; width: 100%; padding: 0.55rem 0.4rem; background: var(--primary-light); color: var(--primary);
	font-weight: 700; border: none; cursor: pointer; font-size: 0.85rem;
}
.monitor-cell-sent:hover { background: #d5ecdf; }
.monitor-cell-empty { display: block; padding: 0.55rem 0.4rem; color: #D1D5DB; border: 1px dashed #E5E7EB; margin: 2px; }

/* Modal ringan, dipakai Monitoring Nilai (pilihan Lihat Detail / Buka Kembali) */
.modal-backdrop {
	display: none; position: fixed; inset: 0; background: rgba(17,24,39,0.45); z-index: 100;
	align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius-card); padding: 1.5rem; max-width: 420px; width: 100%; box-shadow: var(--shadow-card-hover); }
.modal-box h3 { margin: 0 0 0.3rem; font-size: 1rem; }

/* Mode "Tampilan Penuh" khusus Monitoring Nilai: sidebar & topbar disembunyikan,
   konten mengambil seluruh layar supaya cocok untuk screenshot/presentasi. */
.app-shell.monitor-fullscreen .sidebar,
.app-shell.monitor-fullscreen .sidebar-toggle,
.app-shell.monitor-fullscreen .topbar { display: none; }
.app-shell.monitor-fullscreen .content { padding: 1.25rem; max-width: 100%; }
.app-shell.monitor-fullscreen #monitor-summary { margin-top: 0; }

/* ---------- Toggle sidebar (desktop) ---------- */
.sidebar-collapse-btn {
	display: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
	align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
}
.sidebar-collapse-btn:hover { color: var(--primary); border-color: rgba(8,116,67,0.3); }
@media (min-width: 1024px) {
	.sidebar-collapse-btn { display: flex; }
	body.sidebar-hidden .sidebar { display: none; }
	body.sidebar-hidden .main-area { width: 100%; }
}

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.7rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }
.badge-sent, .badge-active { background: var(--primary-light); color: var(--primary); }
.badge-sent .dot, .badge-active .dot { background: var(--primary); }
.badge-draft, .badge-archived { background: #F3F4F6; color: #4B5563; }
.badge-draft .dot, .badge-archived .dot { background: #9CA3AF; }
.badge-warn { background: var(--amber-light); color: var(--amber); }
.badge-warn .dot { background: var(--amber); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-danger .dot { background: var(--danger); }
.badge-info { background: var(--blue-light); color: var(--blue); }
.badge-info .dot { background: var(--blue); }
.chip { display: inline-block; font-size: 0.72rem; font-weight: 600; background: var(--primary-light); color: var(--primary); padding: 0.18rem 0.55rem; border-radius: 6px; }
.chip-gray { background: #F3F4F6; color: #4B5563; }

/* ---------- Empty state ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3.5rem 1rem; color: var(--muted); }
.empty-state .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.empty-state .ic .icon { width: 30px; height: 30px; color: rgba(8,116,67,0.55); }
.empty-state h3 { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin: 0 0 0.3rem; }
.empty-state p { font-size: 0.85rem; max-width: 22rem; margin: 0; }
td.empty-state { display: table-cell; }

/* ---------- Alerts / flash (gaya toast) ---------- */
.flash-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60; display: flex; flex-direction: column; gap: 0.5rem; max-width: 22rem; }
.alert {
	display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.85rem;
	background: #fff; box-shadow: var(--shadow-card-hover); border-left: 4px solid var(--border);
}
.alert .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.05rem; }
.alert-success { border-color: var(--primary); } .alert-success .icon { color: var(--primary); }
.alert-error { border-color: var(--danger); } .alert-error .icon { color: var(--danger); }
.alert-warning { border-color: var(--amber); } .alert-warning .icon { color: var(--amber); }
.alert-static { position: static; box-shadow: var(--shadow-card); margin-bottom: 1rem; max-width: none; }

.section-title { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin: 1.5rem 0 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.hint { color: var(--muted); font-size: 0.82rem; }
.text-warning { color: var(--amber); }
.inline-form { display: inline; }

/* ---------- Progress bar ---------- */
.progress { background: #F3F4F6; border-radius: 999px; height: 10px; overflow: hidden; max-width: 480px; }
.progress-bar { background: var(--primary); height: 100%; border-radius: 999px; transition: width .4s; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.tab-link { padding: 0.6rem 1rem; text-decoration: none; color: var(--muted); font-size: 0.85rem; font-weight: 600; border-bottom: 2px solid transparent; }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-link:hover { color: var(--primary); }

/* ---------- Grid cards (Kelas/Mapel) ---------- */
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3,1fr); } }
.info-card { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0; font-size: 0.85rem; }
.info-card + .info-card { border-top: 1px solid var(--border); }

/* ---------- Responsive: sidebar offcanvas ---------- */
@media (max-width: 1023px) {
	.sidebar-toggle { display: flex; }
	.sidebar { position: fixed; left: -100%; top: 0; transition: left .25s ease; }
	.sidebar.open { left: 0; }
	.sidebar-overlay.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 39; }
	.topbar-inner { padding-left: 4rem; }
	.search-wrap { display: none; }
}
@media (max-width: 640px) {
	.topbar-profile .name, .topbar-profile .role { display: none; }
	.stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Print pages: JANGAN dipengaruhi design system di atas ---------- */
