/* assets/css/style.css - UI rapi dan siap hosting */
:root {
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --app-bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --radius: 14px;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .06);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Topbar */
.navbar {
  min-height: var(--topbar-height);
  z-index: 1040;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border: 0;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .18) !important;
}
.navbar-brand { letter-spacing: .2px; }
.navbar .dropdown-menu { border-radius: 12px; }

/* Layout */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  position: sticky;
  top: var(--topbar-height);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.app-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: calc(100vh - var(--topbar-height));
  background: var(--app-bg);
}
.sidebar-menu {
  overflow-y: auto;
  padding: 1rem 0;
  flex-grow: 1;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.sidebar-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.1rem;
}

/* Sidebar menu */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  margin-right: 10px;
  font-size: 1.05rem;
}
.icon-dashboard { background: #dbeafe; color: #2563eb; }
.icon-school { background: #f3e8ff; color: #9333ea; }
.icon-rpd { background: #dcfce7; color: #16a34a; }
.icon-kwitansi { background: #ffedd5; color: #ea580c; }
.icon-rekening { background: #cffafe; color: #0891b2; }
.icon-lampiran { background: #fee2e2; color: #dc2626; }

.list-group-item {
  margin: .22rem 1rem;
  padding: .62rem .9rem;
  border-radius: 12px !important;
  border: 1px solid transparent;
  color: #475569;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.list-group-item:hover {
  background: #f1f5f9;
  color: var(--primary);
  transform: translateX(2px);
}
.list-group-item.active {
  background: #eff6ff !important;
  color: var(--primary) !important;
  border-color: #bfdbfe !important;
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--primary);
}
.collapse .list-group-item { margin-left: 2rem; font-size: .9rem; }
.offcanvas { border-right: 0; }
.offcanvas .list-group-item { margin-left: .75rem; margin-right: .75rem; }

/* Card, form, buttons */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: #0f172a; }
label, .form-label { font-size: 13px; font-weight: 600; color: #334155; }
.form-control, .form-select {
  font-size: 13px;
  border-radius: 10px;
  border-color: #cbd5e1;
  padding: .48rem .65rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}
.btn { font-size: 13px; border-radius: 10px; padding: .42rem .75rem; font-weight: 600; }
.btn-sm { font-size: 12px; padding: .32rem .55rem; border-radius: 8px; }
td .btn { margin: 1px; }
.alert { font-size: 13px; border-radius: 12px; padding: .75rem 1rem; }
.badge { border-radius: 999px; }

/* Tables */
.table { font-size: 13px; margin-bottom: 0; }
.table th { font-weight: 700; vertical-align: middle; padding: .65rem; color: #334155; }
.table td { padding: .55rem .65rem; vertical-align: middle; }
.table-hover tbody tr:hover { background-color: #f8fafc; }
.table-responsive, .rpd-table-wrap { border-radius: 12px; }
.table thead th { white-space: nowrap; }

/* Modal */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--shadow-md); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 1rem; }
.modal-footer { padding: .75rem 1rem; }
.modal-body .form-label { margin-bottom: .25rem; }

/* Login */
.login-image { background: linear-gradient(135deg, #eff6ff, #f8fafc); }
.login-image img { max-width: 100%; height: auto; }
body.bg-light .card { box-shadow: var(--shadow-md); }

/* RPD UI */
.rpd-toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.rpd-btn { border-radius: 10px; padding: .55rem .9rem; }
.rpd-summary { display: grid; grid-template-columns: 260px 1fr; gap: .85rem; }
.rpd-info .card-body { background: #e0f2fe; border-radius: 12px; }
.rpd-money { min-width: 220px; max-width: 280px; }
.rpd-table-wrap { max-height: 540px; overflow: auto; border: 1px solid #cbd5e1; background: #fff; }
.rpd-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  border-color: rgba(255,255,255,.18);
}
.rpd-col-no { width: 52px; }
.rpd-col-kode { width: 190px; }
.rpd-col-vol { width: 95px; }
.rpd-col-satuan { width: 100px; }
.rpd-col-harga { width: 170px; }
.rpd-col-jumlah { width: 170px; }
.rpd-col-act { width: 95px; }
.rpd-row-program td { background: #ffffff; font-weight: 700; }
.rpd-row-kegiatan td { background: #f8fafc; }
.rpd-row-subtotal td { background: #fff7ed; font-weight: 700; }
.rpd-act {
  border: 0;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
}
.rpd-edit { background: #facc15; }
.rpd-edit i { color: #111827; font-size: 16px; }
.rpd-del { background: #fff; border: 2px solid #ef4444; }
.rpd-del i { color: #ef4444; font-size: 16px; }

/* Kwitansi columns */
.col-no { width: 45px; }
.col-kode { width: 100px; }
.col-bukti { width: 90px; }
.col-tanggal { width: 85px; }
.col-uraian { width: auto; }
.col-jumlah { width: 130px; white-space: nowrap; }
.col-nama { width: 150px; }
.col-aksi { width: 110px; }

/* Utilities */
.text-small, .small, .text-muted { font-size: 12px; }
.text-muted { color: var(--text-muted) !important; }
.row.g-3 > [class^="col"] { margin-bottom: .5rem; }

@media (max-width: 992px) {
  .rpd-summary { grid-template-columns: 1fr; }
  .app-content > .p-3, .app-content > .p-lg-4 { padding: 1rem !important; }
  .card { border-radius: 12px; }
}
@media (max-width: 576px) {
  body { font-size: 13px; }
  .navbar-brand { font-size: 1rem; }
  .btn { width: auto; }
  .rpd-toolbar .btn, .rpd-toolbar .form-select, .rpd-toolbar .form-control { width: 100%; }
}
