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

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e8eef7;
  --jasa: #2563eb;
  --material: #0d9488;
  --green: #059669;
  --danger: #dc2626;
  --white: #ffffff;
  --nav-h: 84px;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

body.admin-body {
  background: var(--bg);
}

.cover-wrap {
  position: relative;
  margin-bottom: 4px;
  overflow: hidden;
}

.cover-photo {
  position: relative;
  height: 210px;
  background: url("../img/bentukbangunan.jpg") center 58% / cover no-repeat;
}

.cover-photo::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), transparent);
}

.cover-blur {
  height: 52px;
  margin-top: -52px;
  background: url("../img/bentukbangunan.jpg") center 94% / cover no-repeat;
  filter: blur(12px);
  pointer-events: none;
}

.cover-wash {
  height: 40px;
  margin-top: -40px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(243, 246, 251, 0), var(--bg));
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 16px;
  color: var(--white);
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.home-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  text-shadow: none;
}

.home-btn svg {
  width: 20px;
  height: 20px;
}

.brand {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.95;
  font-weight: 700;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 12px calc(var(--nav-h) + 20px);
}

body.no-nav .page {
  padding-bottom: 24px;
}

.hero {
  color: var(--text);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.card {
  background: var(--card);
  border: 1px solid #e6edf6;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.list {
  display: grid;
  gap: 6px;
}

.item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.item-date {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 3px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.item-keterangan {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
}

.item-nominal {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.badge {
  display: inline-flex;
  margin-top: 0;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.jasa {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.material {
  background: #ccfbf1;
  color: #0f766e;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 16px 8px;
  font-size: 0.82rem;
}

.total-box {
  margin-top: 12px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 14px;
  text-align: center;
  padding: 12px 12px;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.16);
}

.total-box .label {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 4px;
}

.total-box .value {
  font-size: 1.28rem;
  font-weight: 800;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.page-btn {
  min-width: 36px;
  height: 32px;
  border: 1px solid #dbe3f0;
  background: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #0f172a;
  cursor: pointer;
  font-family: inherit;
}

.page-btn.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(420px, calc(100% - 24px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e2e8f0;
  backdrop-filter: blur(18px);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  z-index: 20;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.bottom-nav a {
  color: #64748b;
  text-decoration: none;
  text-align: center;
  padding: 10px 8px 8px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.82rem;
}

.bottom-nav a svg {
  display: block;
  margin: 0 auto 4px;
  width: 22px;
  height: 22px;
}

.bottom-nav a.active {
  background: #1d4ed8;
  color: #fff;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
}

.field textarea {
  min-height: 64px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}

.btn-primary {
  background: #1d4ed8;
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-ghost {
  background: #e2e8f0;
  color: var(--text);
}

.btn-sm {
  padding: 5px 8px;
  font-size: 0.7rem;
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: none;
  font-weight: 600;
}

.alert.show {
  display: block;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 8px;
  flex-wrap: wrap;
}

.section-title {
  color: var(--text);
  margin: 0;
  font-size: 0.95rem;
}

.data-tabs {
  display: flex;
  gap: 6px;
}

.data-tab {
  border: 1px solid #dbe3f0;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.data-tab.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th {
  text-align: left;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 5px 4px;
  border-bottom: 1px solid var(--line);
}

table.data td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.75rem;
}

table.data td.nominal {
  text-align: right;
  white-space: nowrap;
  font-weight: 800;
}

.aksi-col {
  white-space: nowrap;
  text-align: right;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn.edit {
  background: #dbeafe;
  color: #1d4ed8;
}

.icon-btn.hapus {
  background: #fee2e2;
  color: #dc2626;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal-box {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-box h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.modal-box p {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.modal-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 10px;
}

.modal-error {
  color: #991b1b;
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
}

.lock-note {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  .hide-sm {
    display: none;
  }

  .bottom-nav {
    width: calc(100% - 16px);
    bottom: 8px;
    padding: 4px;
    border-radius: 16px;
  }

  .bottom-nav a {
    padding: 7px 6px 6px;
    font-size: 0.72rem;
  }

  .bottom-nav a svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .cover-photo {
    height: 168px;
  }

  .hero h1 {
    font-size: 1.12rem;
  }

  .card {
    padding: 8px;
    border-radius: 12px;
  }

  table.data td.nominal {
    white-space: normal;
  }
}
