@import url("https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");
:root {
  --ink: #20251f;
  --muted: #747b73;
  --line: #e7eae4;
  --purple: #8244da;
  --purple-dark: #4b267f;
  --soft-green: #edf7ef;
  --purple: #7554c8;
  --orange: #d98538;
  --yellow: #f1b708;
  --surface: #fff;
  --page: #f7f8f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Google Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
}
h1,
h2,
h3,
strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.025em;
}
a {
  color: inherit;
  text-decoration: none;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, #e2f1df 0, transparent 34%),
    radial-gradient(circle at 90% 80%, #fff0cb 0, transparent 30%), #f7f8f5;
}
.login-card {
  width: min(100%, 430px);
  padding: 36px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 70px #183b2012;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--purple);
  color: #fff;
  font:
    800 19px "Plus Jakarta Sans",
    sans-serif;
  box-shadow: 5px 5px 0 #f5cf58;
  margin-bottom: 24px;
}
.brand-mark.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin: 0;
  font-size: 15px;
  flex-shrink: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--yellow);
  margin: 0 0 8px;
}
.login-card h1 {
  font-size: 28px;
  margin: 0 0 8px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.login-card form {
  display: grid;
  gap: 9px;
}
.login-card label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 7px;
}
.login-card input {
  width: 100%;
  border: 1px solid #dce2d9;
  border-radius: 11px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  background: #fff;
}
.login-card input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px #237a4b18;
}
.btn {
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  font:
    700 14px "Google Sans",
    sans-serif;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
}
.btn-primary:hover {
  background: var(--purple-dark);
}
.btn-block {
  width: 100%;
  margin-top: 14px;
}
.back-link {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 22px;
}
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 16px 0;
}
.alert-error {
  background: #fff0ef;
  color: #a82d28;
  border: 1px solid #f5d1ce;
}
.alert-success {
  background: #edf8ef;
  color: #1d683b;
  border: 1px solid #cbe8d2;
}
.admin-page {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 24px 17px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.admin-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 7px 26px;
  border-bottom: 1px solid var(--line);
}

.admin-brand strong {
  font-size: 13px;
  display: block;
}

.admin-brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

/* Logo asli tanpa frame */
.admin-brand .brand-mark.small {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Gambar logo */
.admin-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* batas */
.side-nav {
  padding-top: 20px;
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: #596158;
}
.nav-item.active {
  background: var(--soft-green);
  color: var(--purple);
}
.nav-item.disabled {
  opacity: 0.57;
  cursor: default;
}
.nav-item small {
  font-size: 9px;
  margin-left: auto;
  background: #f1f2ef;
  border-radius: 5px;
  padding: 3px 5px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #9aa098;
  font-weight: 700;
  padding: 17px 12px 4px;
}
.sidebar-bottom {
  margin-top: auto;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 17px 5px 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f6e6ad;
  color: #624b0a;
  font-weight: 800;
}
.user-chip strong {
  display: block;
  font-size: 12px;
}
.user-chip small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.logout-link {
  display: block;
  font-size: 12px;
  color: #9b443d;
  padding: 8px 5px;
}
.admin-main {
  margin-left: 260px;
  padding: 0 34px 28px;
  max-width: 1600px;
}
.topbar {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}
.topbar h1 {
  font-size: 25px;
  margin: 0;
}
.topbar .eyebrow {
  font-size: 10px;
}
.site-link {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 700;
}
.menu-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
}
.welcome-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(110deg, #5b047e, #cfa7df);
  border: 1px solid #e2eddd;
  border-radius: 20px;
  padding: 27px 30px;
  margin: 6px 0 28px;
  min-height: 160px;
}
.welcome-panel h2 {
  font-size: 25px;
  margin: 0 0 8px;
  color: #ffffff;
}
.welcome-panel p:not(.eyebrow) {
  margin: 0;
  color: #f5f7f5;
  font-size: 14px;
  max-width: 600px;
}
.welcome-decoration {
  font-size: 110px;
  line-height: 1;
  color: #c9dfb8;
  /* transform: rotate(-15deg); */
  padding-right: 25px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 26px 0 14px;
}
.section-heading h2 {
  font-size: 17px;
  margin: 0 0 4px;
}
.section-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.stat-icon {
  height: 39px;
  width: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}
.stat-icon.purple {
  background: #f0eaff;
  color: var(--purple);
}
.stat-icon.green {
  background: #e6f5e9;
  color: var(--purple);
}
.stat-icon.orange {
  background: #fff0e2;
  color: var(--orange);
}
.stat-card p {
  font-size: 13px;
  color: #687066;
  margin: 0 0 4px;
}
.stat-card strong {
  font-size: 30px;
  display: block;
  line-height: 1.3;
}
.stat-card span {
  font-size: 11px;
  color: #92998f;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.quick-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
}
.quick-icon {
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  background: #f5f3e9;
  border-radius: 12px;
  color: var(--purple);
  font-size: 20px;
}
.quick-card h3 {
  font-size: 14px;
  margin: 1px 0 6px;
}
.quick-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}
.status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #7c6615;
  background: #fff5ce;
  border-radius: 6px;
  padding: 4px 7px;
}
.admin-footer {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 18px;
  font-size: 11px;
  color: #959b92;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 235px;
  }
  .admin-main {
    margin-left: 235px;
    padding: 0 22px 24px;
  }
  .stats-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 14px;
  }
  .stat-icon {
    grid-row: span 2;
    margin: 0;
  }
  .stat-card p {
    margin: 0;
  }
  .stat-card strong {
    grid-column: 3;
    grid-row: 1/3;
  }
  .stat-card span {
    grid-column: 2;
  }
  .quick-card {
    padding: 15px;
  }
}

.btn.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

/* ===== Admin UI refresh: Bootstrap 5 + Font Awesome ===== */
:root {
  --admin-radius: 16px;
  --admin-shadow: 0 8px 28px rgba(31, 45, 34, 0.055);
  --bs-primary: #7554c8;
  --bs-primary-rgb: 117, 84, 200;
}
body.admin-page {
  font-family: "DM Sans", "Google Sans", Arial, sans-serif;
  color: #20251f;
  background: #f6f8f5;
}
.admin-page .sidebar {
  box-shadow: 3px 0 24px rgba(30, 45, 34, 0.025);
}
.admin-page .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: 12px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}
.admin-page .nav-item:hover {
  background: #f3f0fb;
  color: #6341b2;
}
.admin-page .nav-item.active {
  background: #edf7ef;
  color: #6845bd;
  font-weight: 700;
}
.admin-page .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: #7a8179;
}
.admin-page .nav-item.active .nav-icon {
  color: #7554c8;
}
.admin-page .admin-main {
  min-width: 0;
}
.admin-page .topbar {
  gap: 18px;
  margin-bottom: 24px;
}
.admin-page .topbar h1 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 750;
  line-height: 1.25;
  margin: 3px 0 0;
}
.admin-page .content-panel,
.admin-page .content-panel.form-panel,
.admin-page .spmb-stat,
.admin-page .login-card {
  border: 1px solid #e7ebe5;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}
.admin-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 10px;
  font-weight: 650;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.admin-page .btn:hover {
  transform: translateY(-1px);
}
.admin-page .btn-sm {
  padding: 0.28rem 0.58rem;
  font-size: 0.78rem;
  line-height: 1.35;
  border-radius: 8px;
}
.admin-page .btn-primary {
  background: #7554c8;
  border-color: #7554c8;
  color: #fff;
}
.admin-page .btn-primary:hover,
.admin-page .btn-primary:focus {
  background: #6341b2;
  border-color: #6341b2;
  color: #fff;
}
.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-page select,
.admin-page textarea {
  border-radius: 10px;
}
.admin-page .data-table th,
.admin-page .spmb-table th {
  letter-spacing: 0.055em;
}
.admin-page .data-table tbody tr:hover,
.admin-page .spmb-table tbody tr:hover {
  background: #fafcf9;
}
.admin-page .admin-footer {
  color: #858d83;
  font-size: 0.8rem;
}
@media (max-width: 768px) {
  .admin-page .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .admin-page .topbar > div {
    flex: 1;
    min-width: 180px;
  }
  .admin-page .topbar .btn,
  .admin-page .topbar .site-link {
    margin-left: auto;
  }
}

/* =========================================
   SWEETALERT2 - KONFIRMASI LOGOUT
========================================= */

.swal-logout-popup {
  width: 420px !important;
  max-width: calc(100% - 30px);
  padding: 30px 25px 25px !important;
  border-radius: 18px !important;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  box-shadow: 0 20px 60px rgba(16, 42, 67, 0.2) !important;
}

.swal-logout-popup .swal2-icon {
  margin: 0 auto 22px !important;
}

.swal-logout-title {
  color: #102a43 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  margin-bottom: 10px !important;
}

.swal-logout-text {
  color: #627487 !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.swal-logout-popup .swal2-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px !important;
}

.swal-logout-popup .swal-btn-confirm,
.swal-logout-popup .swal-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 18px;
  border: none !important;
  border-radius: 10px !important;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Tombol Ya, Logout */
.swal-logout-popup .swal-btn-confirm {
  color: #fff !important;
  background: linear-gradient(135deg, #ee5770, #b41933) !important;
  box-shadow: 0 4px 12px rgba(23, 105, 170, 0.22);
}

.swal-logout-popup .swal-btn-confirm:hover {
  background: linear-gradient(135deg, #e63956, #7e061a) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23, 105, 170, 0.3);
}

/* Tombol Batal */
.swal-logout-popup .swal-btn-cancel {
  color: #526579 !important;
  background: #f1f5f9 !important;
  border: 1px solid #dce4ed !important;
}

.swal-logout-popup .swal-btn-cancel:hover {
  color: #102a43 !important;
  background: #e2eaf3 !important;
  transform: translateY(-2px);
}

/* Fokus keyboard */
.swal-logout-popup .swal-btn-confirm:focus-visible,
.swal-logout-popup .swal-btn-cancel:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

/* Tampilan HP */
@media (max-width: 480px) {
  .swal-logout-popup {
    padding: 25px 18px 20px !important;
  }

  .swal-logout-title {
    font-size: 19px !important;
  }

  .swal-logout-popup .swal2-actions {
    gap: 8px;
  }

  .swal-logout-popup .swal-btn-confirm,
  .swal-logout-popup .swal-btn-cancel {
    padding: 10px 13px;
    font-size: 11px;
  }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1100;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100%;
  }

  .topbar {
    padding-top: 60px;
    min-height: 82px;
    justify-content: flex-start;
  }
  .menu-toggle {
    display: block;
  }
  .topbar h1 {
    font-size: 21px;
  }
  .site-link {
    margin-left: auto;
    font-size: 11px;
    padding: 9px;
  }
  .welcome-panel {
    padding: 22px 20px;
    min-height: 140px;
  }
  .welcome-panel h2 {
    font-size: 21px;
  }
  .welcome-panel p:not(.eyebrow) {
    font-size: 12px;
  }
  .welcome-decoration {
    font-size: 68px;
    padding-right: 0;
  }
  .section-heading {
    margin-top: 22px;
  }
  .login-card {
    padding: 27px 23px;
  }
}
