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

:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #e0f2fe;
  --accent: #f97316;
  --accent-light: #fff7ed;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #0ea5e9;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); display: flex; height: 100vh; overflow: hidden; }
body.auth-body { display: block; height: auto; min-height: 100vh; overflow: auto; }

/* SIDEBAR */
.sidebar {
  width: 260px; min-width: 260px; background: var(--sidebar-bg); height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
}

/* Sidebar collapse (toggled via button in topbar; state remembered in localStorage) */
body.sidebar-collapsed .sidebar { width: 0; min-width: 0; overflow: hidden; }
body.sidebar-collapsed .sidebar > * { visibility: hidden; }

.sidebar-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--border);
  background: #fff; color: var(--text-muted); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.2s; font-family: inherit;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text); border-color: var(--primary); }
.sidebar-logo {
  padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 12px;
}
.logo-icon {
  width: 42px; height: 42px; background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.logo-text { color: #fff; }
.logo-text .name { font-size: 13px; font-weight: 700; line-height: 1.2; }
.logo-text .sub { font-size: 10px; color: var(--sidebar-text); font-weight: 400; }

.sidebar-search {
  margin: 14px 16px 4px; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px 12px; transition: border-color 0.2s, background 0.2s;
}
.sidebar-search:focus-within { border-color: var(--primary); background: rgba(255,255,255,0.09); }
.sidebar-search .icon { font-size: 13px; color: var(--sidebar-text); flex-shrink: 0; }
.sidebar-search input {
  border: none; background: transparent; outline: none; flex: 1; min-width: 0;
  font-family: inherit; font-size: 12.5px; color: #e2e8f0; padding: 0; box-shadow: none;
}
.sidebar-search input::placeholder { color: #64748b; }
.sidebar-search .clear-btn {
  border: none; background: transparent; color: var(--sidebar-text); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px; flex-shrink: 0;
}
.sidebar-search .clear-btn:hover { color: #fff; }
.sidebar-no-result { padding: 8px 20px 4px; font-size: 12px; color: var(--sidebar-text); text-align: center; }

.nav-section { padding: 16px 12px 8px; }
.nav-label { font-size: 10px; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 1px; padding: 0 8px; margin-bottom: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  cursor: pointer; color: var(--sidebar-text); font-size: 13px; font-weight: 500;
  transition: all 0.2s; margin-bottom: 2px; position: relative; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #cbd5e1; }
.nav-item.active { background: rgba(14,165,233,0.15); color: var(--sidebar-active); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 24px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }
.nav-item .arrow { margin-left: auto; font-size: 10px; transition: transform 0.2s; }
.nav-item.open .arrow { transform: rotate(90deg); }

.sub-menu { padding-left: 32px; overflow: hidden; max-height: 0; transition: max-height 0.3s; }
.sub-menu.open { max-height: 400px; }
.sub-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
  cursor: pointer; color: #64748b; font-size: 12px; font-weight: 500;
  transition: all 0.2s; margin-bottom: 2px; text-decoration: none;
}
.sub-item:hover { background: rgba(255,255,255,0.05); color: #cbd5e1; }
.sub-item.active { color: var(--primary); background: rgba(14,165,233,0.08); }
.sub-item::before { content: '•'; font-size: 8px; }

.sidebar-footer {
  margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,0.07);
  color: var(--sidebar-text); font-size: 12px;
}

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 64px; display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 16px; font-weight: 700; color: var(--text); }
.breadcrumb { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb span { color: var(--primary); }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.school-badge {
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}
.role-badge {
  background: #ecfdf5; color: #065f46;
  font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}
.user-avatar {
  width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration:none;
}

.content { flex: 1; overflow-y: auto; padding: 28px; }

/* BACK TO TOP */
.back-to-top {
  position: fixed; right: 28px; bottom: 28px; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(14,165,233,0.35);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.2s;
  z-index: 40;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }
@media (max-width: 900px) {
  .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; font-size: 16px; }
}

/* Sidebar's own back-to-top: the sidebar (.sidebar) scrolls independently
   (overflow-y:auto) when the menu list is long, separate from .content.
   Direct child of .sidebar so it auto-hides via the existing
   "body.sidebar-collapsed .sidebar > *" rule when the sidebar is collapsed. */
.sidebar-back-to-top {
  position: fixed; left: 16px; bottom: 16px; width: 38px; height: 38px;
  border: none; border-radius: 50%; background: rgba(255,255,255,0.1); color: #e2e8f0;
  font-size: 15px; line-height: 1; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.2s;
  z-index: 40;
}
.sidebar-back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.sidebar-back-to-top:hover { background: var(--primary); color: #fff; }

/* CARDS */
.card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 24px; }

/* STAT CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); }
.stat-icon.orange { background: var(--accent-light); }
.stat-icon.green { background: var(--success-light); }
.stat-icon.red { background: var(--danger-light); }
.stat-val { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

.charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-area {
  height: 220px; display: flex; align-items: flex-end; gap: 4px;
  padding: 0 10px 10px; border-top: 1px solid var(--border);
}
.chart-bar-group { display: flex; gap: 3px; align-items: flex-end; flex: 1; }
.chart-bar { border-radius: 4px 4px 0 0; flex: 1; cursor: pointer; transition: opacity 0.2s; }
.chart-bar:hover { opacity: 0.8; }

/* TABLE */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg); padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* BADGE */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge.success { background: var(--success-light); color: var(--success); }
.badge.warning { background: var(--warning-light); color: #92400e; }
.badge.danger { background: var(--danger-light); color: var(--danger); }
.badge.primary { background: var(--primary-light); color: var(--primary-dark); }
.badge.gray { background: #f1f5f9; color: #64748b; }

/* PAGINATION */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-label { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.pager-num, .pager-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: 6px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; line-height: 1;
}
.pager-num { border: 1px solid var(--border); background: white; color: var(--text-muted); transition: all 0.15s; }
.pager-num:hover { border-color: var(--primary); color: var(--primary-dark); }
.pager-num.active { background: var(--primary); border-color: var(--primary); color: white; }
.pager-ellipsis { color: var(--text-muted); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
  border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: inherit; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,165,233,0.4); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-orange { background: var(--accent); color: white; }
.btn-orange:hover { background: #ea580c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* FORM */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
input, select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: white;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.error-text { font-size: 11px; color: var(--danger); margin-top: 4px; }

.progress { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width 0.5s; }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut-chart { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.donut-chart svg { transform: rotate(-90deg); }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.donut-center .val { font-size: 22px; font-weight: 800; color: var(--text); }
.donut-center .lbl { font-size: 10px; color: var(--text-muted); }
.donut-legend { flex: 1; min-width: 140px; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.tabs { display: flex; gap: 2px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 20px; flex-wrap:wrap; }
.tab {
  flex: 1; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; background: transparent;
  color: var(--text-muted); transition: all 0.2s; text-align: center; text-decoration:none; white-space:nowrap;
}
.tab.active { background: white; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.search-bar {
  display: flex; align-items: center; gap: 10px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 8px; padding: 9px 14px;
  font-size: 13px; color: var(--text-muted);
}
.search-bar input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 13px; color: var(--text); padding: 0; box-shadow: none;
}

.filter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-row .flex-1 { flex: 1; min-width:160px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

.drop-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; cursor: pointer; transition: all 0.2s; }
.drop-area:hover { border-color: var(--primary); background: var(--primary-light); }
.drop-icon { font-size: 48px; margin-bottom: 12px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.mini-stat { background: var(--bg); border-radius: 10px; padding: 16px; text-align: center; }
.mini-stat-val { font-size: 24px; font-weight: 800; }
.mini-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }
.alert-success { background: var(--success-light); color: #065f46; border-left: 4px solid var(--success); }
.alert-warning { background: var(--warning-light); color: #78350f; border-left: 4px solid var(--warning); }
.alert-danger { background: var(--danger-light); color: #991b1b; border-left: 4px solid var(--danger); }

.divider { height: 1px; background: var(--border); margin: 20px 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: 18px; font-weight: 800; }
.section-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1.5px solid transparent; cursor: pointer; transition: all 0.2s; text-decoration:none; }
.pill.active { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary-light); }
.pill:not(.active) { background: white; color: var(--text-muted); border-color: var(--border); }
.pill:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

.steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step { display: flex; align-items: center; flex: 1; }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.step-num.done { background: var(--success); color: white; }
.step-num.current { background: var(--primary); color: white; }
.step-num.pending { background: var(--bg); color: var(--text-muted); border: 2px solid var(--border); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step-line.done { background: var(--success); }

.period-select { background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-family: inherit; color: var(--text); outline: none; cursor: pointer; }
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rekon-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius); padding: 28px; color: white; margin-bottom: 20px; }

.ppdb-hero { background: linear-gradient(135deg, #0f172a, #1e293b); border-radius: var(--radius); padding: 32px; color: white; margin-bottom: 24px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.ppdb-logo { width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.ppdb-info h2 { font-size: 28px; font-weight: 800; }
.ppdb-info p { color: rgba(255,255,255,0.7); margin-top: 4px; }
.ppdb-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.ppdb-stat { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; text-align: center; }
.ppdb-stat-val { font-size: 28px; font-weight: 800; color: var(--text); }
.ppdb-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.justify-between { justify-content: space-between; }
.mb-0{margin-bottom:0} .mb-2{margin-bottom:8px} .mb-3{margin-bottom:12px} .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-4 { margin-top: 16px; }
.pb-3{padding-bottom:12px}
.text-sm { font-size: 13px; } .text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; } .font-semi { font-weight: 600; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.flex-1{flex:1}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.month-labels { display: flex; gap: 4px; padding: 0 10px; }
.month-label { flex: 1; text-align: center; font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.table-wrap { overflow-x: auto; }

.av-blue { background: #dbeafe; color: #1d4ed8; }
.av-green { background: #dcfce7; color: #15803d; }
.av-purple { background: #f3e8ff; color: #7c3aed; }
.av-orange { background: #ffedd5; color: #c2410c; }
.av-pink { background: #fce7f3; color: #be185d; }

.kelas-flow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.kelas-box { flex: 1; min-width:180px; background: var(--bg); border-radius: 10px; padding: 16px; border: 1.5px solid var(--border); }
.flow-arrow { font-size: 24px; color: var(--primary); flex-shrink: 0; }

.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.quick-link { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; text-align: center; cursor: pointer; transition: all 0.2s; text-decoration:none; display:block; }
.quick-link:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(14,165,233,0.15); transform: translateY(-2px); }
.quick-link-icon { font-size: 28px; margin-bottom: 8px; }
.quick-link-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.activity-text { flex: 1; }
.activity-title { font-size: 13px; font-weight: 600; }
.activity-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.activity-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* AUTH PAGE */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#0f172a,#0284c7); padding: 20px; }
.auth-card { background: white; border-radius: 20px; padding: 40px; max-width: 400px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-logo { width: 60px; height: 60px; background: linear-gradient(135deg, #0ea5e9, #0284c7); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px; }
.auth-demo { background: var(--bg); border-radius: 10px; padding: 12px 16px; font-size: 11px; color: var(--text-muted); margin-top: 20px; line-height: 1.8; }

/* FOTO SISWA/GTK: upload + live camera capture */
.foto-area { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.foto-preview { width: 110px; height: 110px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; flex-shrink: 0; }
.foto-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-controls { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.camera-wrap { position: relative; background: #000; border-radius: 10px; overflow: hidden; width: 100%; max-width: 340px; margin-top: 10px; }
.camera-video { width: 100%; display: block; }
.camera-canvas { display: none; }
.camera-snap-btn { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.92); border: 3px solid #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.camera-snap-btn:hover { transform: translateX(-50%) scale(1.06); }

/* REKAP: ring kelengkapan data (mini donut) */
.ring-mini { position: relative; display: inline-block; flex-shrink: 0; }
.ring-mini svg { display: block; }
.ring-mini-val { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-weight: 800; }
.ring-stat { display: flex; align-items: center; gap: 10px; }
.ring-stat-label { font-size: 12px; font-weight: 700; color: var(--text); }
.ring-stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* REKAP KELAS: kartu rombel dengan ring kelengkapan */
.rombel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rombel-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; background: white; transition: all .15s; }
.rombel-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(14,165,233,.12); transform: translateY(-1px); }
.rombel-card .rombel-name { font-size: 13px; font-weight: 800; color: var(--text); }
.rombel-card .rombel-sub { font-size: 11px; color: var(--text-muted); }
.rombel-card-add { border: 1.5px dashed var(--border); border-radius: 12px; padding: 14px; text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 12px; font-weight: 700; min-height: 128px; transition: all .15s; }
.rombel-card-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* DETAIL SISWA: aksi siklus siswa (pindah/naik/lulus/dll) */
.lifecycle-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.lifecycle-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; width: 74px; }
.lifecycle-btn .lc-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--primary-light); color: var(--primary-dark); transition: all .15s; }
.lifecycle-btn:hover .lc-icon { transform: scale(1.08); box-shadow: 0 2px 10px rgba(14,165,233,.25); }
.lifecycle-btn .lc-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.3; }
.lifecycle-btn.disabled { pointer-events: none; opacity: .5; cursor: not-allowed; }
.lifecycle-btn.disabled .lc-icon { background: var(--bg); color: var(--text-muted); }
.family-ring-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.family-ring-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.family-ring-item .frl { font-size: 11px; font-weight: 700; color: var(--text); }

/* KELAS: seleksi siswa massal (pindah/naik/kelulusan) - kartu + toggle, mirip alur PPDB pihak ketiga */
.ss-panel { border: 1.5px solid var(--border); border-radius: 14px; padding: 18px 20px; background: white; }
.ss-stats-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.ss-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.ss-stat-label { font-size: 10.5px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.ss-stat-val { font-size: 19px; font-weight: 800; color: var(--text); margin-top: 3px; }
.ss-select-all { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--text-muted); user-select: none; }
.ss-toggle-track { width: 38px; height: 22px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; flex-shrink: 0; }
.ss-toggle-track.on { background: var(--accent); }
.ss-toggle-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ss-toggle-track.on .ss-toggle-knob { left: 18px; }

.siswa-select-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.siswa-select-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); border: 1.5px solid transparent; border-radius: 12px; padding: 11px 14px; cursor: pointer; transition: all .15s; }
.siswa-select-item:hover { border-color: var(--border); }
.siswa-select-item.selected { background: var(--accent-light); border-color: var(--accent); }
.siswa-select-item .ssi-name { font-size: 13px; font-weight: 700; color: var(--text); }
.siswa-select-item .ssi-nis { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.siswa-select-item .ssi-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; background: white; transition: all .15s; }
.siswa-select-item.selected .ssi-check { background: var(--accent); border-color: var(--accent); color: white; }

.ss-continue-btn { width: 100%; margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--accent); color: white; border: none; font-weight: 800; font-size: 14px; cursor: pointer; transition: all .15s; }
.ss-continue-btn:hover { background: #ea580c; }
.ss-continue-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

/* LAPORAN KEUANGAN — per kategori tagihan */
.lk-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.lk-tab-pill { background: var(--primary); color: white; border: none; padding: 10px 22px; border-radius: 24px; font-size: 13px; font-weight: 700; cursor: default; white-space: nowrap; }
.lk-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 24px; padding: 8px 8px 8px 18px; }
.lk-search input { border: none; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--text); padding: 0; box-shadow: none; }
.lk-search button { border: none; background: var(--primary); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; font-size: 13px; }
.lk-ta-select { border: 1.5px solid var(--border); border-radius: 24px; padding: 9px 16px; font-size: 13px; font-weight: 700; color: var(--primary-dark); background: var(--card); cursor: pointer; }
.lk-export-wrap { position: relative; flex-shrink: 0; }
.lk-export-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; color: var(--text-muted); }
.lk-export-btn:hover { border-color: var(--primary); color: var(--primary); }
.lk-export-menu { position: absolute; top: 46px; left: 0; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.14); min-width: 170px; z-index: 80; display: none; overflow: hidden; }
.lk-export-menu.open { display: block; }
.lk-export-menu button { display: block; width: 100%; text-align: left; padding: 10px 16px; border: none; background: none; font-size: 13px; cursor: pointer; color: var(--text); }
.lk-export-menu button:hover { background: var(--bg); }

.lk-legend { display: flex; gap: 14px; align-items: center; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.lk-legend-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.lk-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.lk-legend-dot.lunas { background: #06b6d4; }
.lk-legend-dot.belum { background: #6366f1; }
.lk-legend-dot.exp { background: #d946ef; }

.lk-bar-wrap { position: relative; min-width: 170px; }
.lk-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: #f1f5f9; width: 100%; }
.lk-bar-seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: white; cursor: pointer; min-width: 4px; transition: filter .15s; }
.lk-bar-seg:hover { filter: brightness(1.08); }
.lk-bar-seg.lunas { background: #06b6d4; }
.lk-bar-seg.belum { background: #6366f1; }
.lk-bar-seg.exp { background: #d946ef; }
.lk-bar-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-muted); }

.lk-popover { position: absolute; z-index: 90; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,0.18); padding: 16px 20px; text-align: center; min-width: 170px; display: none; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
.lk-popover.open { display: block; }
.lk-popover::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: white; }
.lk-popover-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.lk-popover-amount { font-size: 16px; font-weight: 800; margin: 4px 0 10px; white-space: nowrap; }
.lk-popover-btn { display: inline-block; background: var(--primary); color: white; border: none; padding: 8px 26px; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; }
.lk-popover-btn:hover { background: var(--primary-dark); }

/* CARI TAGIHAN */
.ct-header { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.ct-header-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ct-header-title { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.2; }
.ct-header-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.ct-filter-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 28px; margin-bottom: 22px; }
.ct-filter-row label { font-size: 12.5px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; margin-bottom: 8px; }
.ct-select, .ct-date-range input[type="date"] {
  width: 100%; padding: 11px 16px; border: 1.5px solid var(--primary-light); border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--primary-dark); background: white; outline: none; cursor: pointer; transition: border-color .2s;
}
.ct-select:focus, .ct-date-range input[type="date"]:focus { border-color: var(--primary); }
.ct-date-range { display: flex; align-items: center; gap: 8px; }
.ct-date-range input[type="date"] { color: var(--text); font-weight: 500; cursor: text; flex: 1; min-width: 0; }
.ct-date-range span { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.ct-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ct-btn-search { background: var(--primary); color: white; border: none; padding: 13px 44px; border-radius: 24px; font-size: 13.5px; font-weight: 700; cursor: pointer; letter-spacing: .3px; }
.ct-btn-search:hover { background: var(--primary-dark); }
.ct-btn-export { background: white; color: var(--primary); border: 1.5px solid var(--primary); padding: 11.5px 34px; border-radius: 24px; font-size: 13.5px; font-weight: 700; cursor: pointer; letter-spacing: .3px; }
.ct-btn-export:hover { background: var(--primary-light); }
.ct-group-header { background: var(--bg); }
.ct-group-header td { padding: 10px 16px !important; font-weight: 700; font-size: 12.5px; color: var(--primary-dark); border-bottom: 1.5px solid var(--border) !important; }

/* LAPORAN TAGIHAN — breakdown kategori chart */
.lt-chart-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.lt-chart-total-label { font-size: 13px; color: var(--text-muted); }
.lt-chart-total-val { font-size: 14px; font-weight: 800; color: var(--primary); margin-left: 4px; }
.lt-bar-wrap { position: relative; margin-bottom: 18px; }
.lt-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; width: 100%; }
.lt-bar-seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: white; cursor: pointer; min-width: 2px; transition: filter .15s; white-space: nowrap; overflow: hidden; }
.lt-bar-seg:hover { filter: brightness(1.08); }
.lt-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.lt-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); cursor: pointer; }
.lt-legend-item:hover { color: var(--text); }
.lt-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.lt-popover { position: absolute; z-index: 90; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,0.18); padding: 16px 20px; text-align: center; min-width: 170px; display: none; top: calc(100% + 12px); transform: translateX(-50%); }
.lt-popover.open { display: block; }
.lt-popover::before { content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); border: 7px solid transparent; border-bottom-color: white; }
.lt-popover-title { font-size: 11.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-popover-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.lt-popover-amount { font-size: 16px; font-weight: 800; margin: 4px 0 10px; white-space: nowrap; }
.lt-popover-btn { display: inline-block; background: var(--primary); color: white; border: none; padding: 8px 26px; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; }
.lt-popover-btn:hover { background: var(--primary-dark); }

/* GTK — dashboard, list alfabetis, detail kategori, form kepegawaian */
.gtk-hero { background: linear-gradient(135deg,#0f172a,#1e3a5f); border-radius: var(--radius); padding: 20px 26px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.gtk-hero-title { color: white; font-weight: 800; font-size: 20px; }
.gtk-hero-sub { color: rgba(255,255,255,0.6); font-size: 12.5px; margin-top: 4px; }
.gtk-hero-total { text-align: right; }
.gtk-hero-total-val { color: #22d3ee; font-weight: 800; font-size: 26px; line-height: 1; }
.gtk-hero-total-lbl { color: rgba(255,255,255,0.55); font-size: 11px; margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

.gtk-action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gtk-action-tile { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; text-decoration: none; transition: all .15s; }
.gtk-action-tile:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(14,165,233,0.15); transform: translateY(-2px); }
.gtk-action-tile-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.gtk-action-tile-title { font-size: 14px; font-weight: 700; color: var(--text); }
.gtk-action-tile-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.gtk-filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.gtk-filter-bar select { font-size: 13px; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 20px; background: white; color: var(--text); }
.gtk-add-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: white; border: none; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; text-decoration: none; margin-left: auto; flex-shrink: 0; }
.gtk-add-btn:hover { background: var(--primary-dark); }

.gtk-letter-group { margin-bottom: 18px; }
.gtk-letter-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-light); color: var(--primary-dark); font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.gtk-person-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gtk-person-card { display: flex; align-items: center; gap: 12px; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; text-decoration: none; transition: all .15s; }
.gtk-person-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(14,165,233,0.1); }
.gtk-person-name { font-size: 13px; font-weight: 700; color: var(--text); }
.gtk-person-role { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.gtk-profile-card { text-align: center; padding: 26px; }
.gtk-profile-name { font-size: 17px; font-weight: 800; margin-top: 12px; }
.gtk-profile-role { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.gtk-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gtk-cat-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; text-decoration: none; transition: all .15s; }
.gtk-cat-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(14,165,233,0.1); }
.gtk-cat-card-left { display: flex; align-items: center; gap: 12px; }
.gtk-cat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.gtk-cat-title { font-size: 13px; font-weight: 700; color: var(--text); }
.gtk-cat-pct { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.gtk-cat-arrow { color: var(--text-muted); font-size: 16px; }
.gtk-delete-link { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: none; }
.gtk-delete-link:hover { text-decoration: underline; }

.gtk-radio-list { border: 1px solid var(--border); border-radius: 12px; padding: 4px 0; margin-bottom: 16px; max-height: 320px; overflow-y: auto; }
.gtk-radio-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--bg); cursor: pointer; font-size: 13px; }
.gtk-radio-item:last-child { border-bottom: none; }
.gtk-radio-item:hover { background: var(--bg); }
.gtk-radio-item input[type=radio], .gtk-radio-item input[type=checkbox] { accent-color: var(--success); width: 17px; height: 17px; flex-shrink: 0; cursor: pointer; }
.gtk-radio-item-label { color: var(--text); }

.gtk-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.gtk-switch-label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.gtk-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.gtk-switch input { opacity: 0; width: 0; height: 0; }
.gtk-switch-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; cursor: pointer; transition: background .2s; }
.gtk-switch-slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.gtk-switch input:checked + .gtk-switch-slider { background: var(--success); }
.gtk-switch input:checked + .gtk-switch-slider::before { transform: translateX(18px); }

.gtk-doc-item { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.gtk-doc-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.gtk-doc-info { flex: 1; min-width: 0; }
.gtk-doc-name { font-size: 13px; font-weight: 700; color: var(--text); }
.gtk-doc-status { font-size: 11.5px; margin-top: 1px; }

@media (max-width: 900px) {
  /* Mobile sidebar: full-screen fixed overlay (taken out of flex flow) instead of an
     inline stacked block. Open = covers the entire viewport; collapsed = width 0 and
     invisible. Because it's position:fixed, .main always fills 100% of the body width
     regardless of sidebar state, so there's no leftover/blank space when collapsed. */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 1000;
    width: 100%; height: 100vh; height: 100dvh;
    box-shadow: 8px 0 32px rgba(0,0,0,.25);
  }
  body.sidebar-collapsed .sidebar { box-shadow: none; }
  .main { width: 100%; }
  .stats-grid, .ppdb-stats, .quick-links, .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-2, .charts-row, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .rombel-grid { grid-template-columns: repeat(2,1fr); }
  .family-ring-grid { grid-template-columns: 1fr; }
  .siswa-select-grid { grid-template-columns: 1fr; }
  .ss-stats-row { flex-direction: column; align-items: flex-start; }
  .content { padding: 16px; }
  .lk-toolbar { flex-direction: column; align-items: stretch; }
  .lk-bar-wrap { min-width: 130px; }
  .ct-filter-row { grid-template-columns: 1fr; }
  .ct-actions { flex-direction: column-reverse; align-items: stretch; }
  .ct-btn-search, .ct-btn-export { text-align: center; }
  .lt-popover { min-width: 150px; max-width: 80vw; }
  .gtk-action-grid, .gtk-person-grid, .gtk-cat-grid { grid-template-columns: 1fr; }
  .gtk-hero { flex-direction: column; align-items: flex-start; }
  .gtk-hero-total { text-align: left; }
}

/* ============================================================
   INVENTARIS — Sistem Pendataan & Manajemen Aset
   ============================================================ */
.aset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.aset-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; gap: 14px; text-decoration: none; color: inherit; transition: all .15s;
}
.aset-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(14,165,233,0.12); transform: translateY(-2px); }
.aset-card-icon {
  width: 56px; height: 56px; border-radius: 12px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
}
.aset-card-body { min-width: 0; flex: 1; }
.aset-card-name { font-size: 13.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aset-card-code { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.aset-card-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.aset-flat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

@media (max-width: 900px) {
  .aset-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WARUNG SANTRI — Kasir Kopontren (POS) & Keuangan Santri
   ============================================================ */
.pos-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.pos-main { min-width: 0; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.pos-card {
  position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; cursor: pointer; transition: all .12s; text-align: left;
}
.pos-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(14,165,233,0.14); transform: translateY(-1px); }
.pos-card-habis { opacity: .45; cursor: not-allowed; pointer-events: none; }
.pos-card-promo {
  position: absolute; top: 6px; right: 6px; background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 20px; letter-spacing: .3px;
}
.pos-card-name { font-size: 12.5px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; min-height: 32px; }
.pos-card-price { font-size: 13.5px; font-weight: 800; color: var(--primary-dark); }
.pos-card-price-old { font-size: 10.5px; font-weight: 500; color: var(--text-muted); text-decoration: line-through; }
.pos-card-stok { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.pos-cart { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: sticky; top: 12px; }
.pos-cart-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.pos-cart-item:last-child { border-bottom: none; }
.pos-cart-item-name { flex: 1; min-width: 0; font-weight: 600; }
.pos-cart-item-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pos-cart-item-qty button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 13px; line-height: 1; }

.pos-metode-btn { flex: 1 1 45%; }
.pos-metode-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.pos-pin-display { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 4px; padding: 10px; background: var(--bg); border-radius: 10px; margin-bottom: 10px; }
.pos-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos-keypad button { padding: 12px 0; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.pos-keypad button:hover { background: var(--bg); }

@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
}

/* ===== Koperasi module additions ===== */
.card-title-sm { font-size: 13px; font-weight: 700; }
.tab-panel { }
.font-mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
.mt-6 { margin-top: 24px; }
.mb-5 { margin-bottom: 20px; }
