/* ==========================================================================
   Website PT. Bank Perekonomian Rakyat Bukit Cati Pematang Panjang
   Gaya: korporat formal - dominan putih/abu bersih, aksen merah & kuning.
   ========================================================================== */

:root {
  --red: #C1121F;
  --red-dark: #960D18;
  --red-soft: #FDECEE;
  --yellow: #F2B705;
  --yellow-soft: #FFF7E0;
  --ink: #111827;
  --ink-2: #1F2937;
  --muted: #5B6472;
  --line: #E3E6EB;
  --bg-soft: #F5F6F8;
  --white: #FFFFFF;
  --green: #1E6B3A;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06), 0 2px 8px rgba(17, 24, 39, .04);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, .08);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 14px; color: var(--ink); font-weight: 700; }
h1 { font-size: 2.15rem; letter-spacing: -.4px; }
h2 { font-size: 1.6rem; letter-spacing: -.2px; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 16px; color: var(--ink-2); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

/* ---------- Top bar & header ---------- */
.topbar {
  background: var(--ink);
  color: #D9DDE5;
  font-size: .82rem;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar .topbar-info { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.topbar span strong { color: var(--white); font-weight: 600; }
.topbar .topbar-note { color: #AEB6C4; }

.site-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .b1 {
  font-size: .72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}
.brand-text .b2 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  max-width: 320px;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 9px 13px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--red); }
.main-nav a.active { color: var(--red); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red) 0 60%, var(--yellow) 60% 100%);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-yellow { background: var(--yellow); color: #3B2A00; }
.btn-yellow:hover { background: #DFA600; }
.btn-sm { padding: 8px 14px; font-size: .84rem; }
.btn-danger { background: #B42318; color: var(--white); }
.btn-danger:hover { background: #8F1B12; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 55%, var(--yellow) 55% 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
  padding-top: 68px;
  padding-bottom: 68px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 18px; }
.hero .hero-lead { font-size: 1.03rem; color: var(--muted); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.hero-card .hc-logo { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.hero-card .hc-logo img { width: 68px; height: 68px; }
.hero-card .hc-logo strong { display: block; font-size: 1rem; }
.hero-card .hc-logo span { font-size: .82rem; color: var(--muted); }
.hero-card dl { margin: 0; display: grid; gap: 14px; }
.hero-card dt { font-size: .74rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hero-card dd { margin: 3px 0 0; font-size: .92rem; color: var(--ink-2); }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 10px;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red) 0 60%, var(--yellow) 60% 100%);
}
.section-head.center h2::after { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); margin-bottom: 0; }

/* ---------- Grid & kartu ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.card-link { margin-top: auto; padding-top: 16px; font-weight: 700; font-size: .9rem; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature-list li {
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.feature-list .tick {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: .82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}
.feature-list strong { display: block; }

.list-bullet { margin: 0 0 16px; padding-left: 20px; color: var(--ink-2); }
.list-bullet li { margin-bottom: 6px; }

.prose h3 { margin-top: 28px; }
.prose p { color: var(--ink-2); }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-soft); font-size: .78rem; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.actions { white-space: nowrap; }

/* ---------- Tab laporan ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.tabs a {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--white);
}
.tabs a:hover { border-color: var(--ink); text-decoration: none; }
.tabs a.active { background: var(--red); border-color: var(--red); color: var(--white); }

.doc-list { display: grid; gap: 16px; }
.doc-item {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.doc-item .doc-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--yellow-soft);
  color: #8A6A00;
  font-weight: 800;
  font-size: .72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-item .doc-meta { flex: 1; min-width: 0; }
.doc-item .doc-meta strong { display: block; font-size: .98rem; }
.doc-item .doc-meta span { font-size: .82rem; color: var(--muted); }
.doc-item .doc-meta .doc-date {
  display: block;
  margin-top: 5px;
  font-weight: 600;
  color: var(--ink-2);
}
.doc-item .doc-meta .doc-note { display: block; margin-top: 6px; }
.doc-item .doc-action { flex: 0 0 auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Formulir ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 34px;
}
.form-grid { display: grid; gap: 22px; }
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.form-row .hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=number],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D5D9E0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row input[type=file] {
  width: 100%;
  padding: 11px 12px;
  border: 1px dashed #C4CAD4;
  border-radius: 8px;
  background: var(--bg-soft);
  font-size: .88rem;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, .12);
}
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

/* ---------- Alert ---------- */
.alert { border-radius: 10px; padding: 15px 18px; font-size: .9rem; margin-bottom: 20px; border: 1px solid; }
.alert-success { background: #ECFDF3; border-color: #A6F4C5; color: #05603A; }
.alert-error { background: #FEF3F2; border-color: #FDA29B; color: #912018; }
.alert-info { background: #EFF8FF; border-color: #B2DDFF; color: #175CD3; }
.alert-warning { background: var(--yellow-soft); border-color: #F5D98B; color: #7A5800; }
.alert a { font-weight: 700; }
.alert code { background: rgba(0,0,0,.05); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* ---------- Kontak ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 16px; }
.contact-list .ci {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.contact-list strong { display: block; font-size: .8rem; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.map-frame iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--white);
  border-radius: 16px;
  padding: 34px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-strip h3 { color: var(--white); margin-bottom: 6px; }
.cta-strip p { color: #C7CDD8; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #B9C0CC; padding: 56px 0 0; margin-top: 0; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 38px; }
.site-footer h4 { color: var(--white); font-size: .95rem; letter-spacing: .4px; margin-bottom: 16px; }
.site-footer p { color: #B9C0CC; font-size: .9rem; }
.site-footer a { color: #D8DDE6; font-size: .9rem; }
.site-footer a:hover { color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 54px; height: 54px; background: var(--white); border-radius: 50%; padding: 3px; }
.footer-brand strong { color: var(--white); font-size: .95rem; line-height: 1.3; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 18px 0;
  font-size: .82rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Halaman judul ---------- */
.page-head {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 40px;
}
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.page-head h1 { margin-bottom: 10px; }
.page-head p { max-width: 720px; color: var(--muted); margin-bottom: 0; }

/* ==========================================================================
   Area admin
   ========================================================================== */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #C3CAD6; padding: 26px 20px; }
.admin-side .as-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.admin-side .as-brand img { width: 44px; height: 44px; background: var(--white); border-radius: 50%; padding: 2px; }
.admin-side .as-brand strong { color: var(--white); font-size: .88rem; line-height: 1.3; display: block; }
.admin-side nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.admin-side nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 8px;
  color: #C3CAD6;
  font-size: .9rem;
  font-weight: 600;
}
.admin-side nav a:hover { background: rgba(255, 255, 255, .08); color: var(--white); text-decoration: none; }
.admin-side nav a.active { background: var(--red); color: var(--white); }
.admin-side .as-foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.admin-main { padding: 32px 36px 60px; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.admin-topbar h1 { font-size: 1.45rem; margin: 0; }
.admin-topbar .who { font-size: .86rem; color: var(--muted); }
.admin-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.admin-panel h2 { font-size: 1.08rem; margin-bottom: 18px; }
.admin-panel h2.with-sub { margin-bottom: 4px; }
.admin-panel .panel-sub { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card span { display: block; font-size: .76rem; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat-card strong { font-size: 1.7rem; display: block; margin-top: 6px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}
.badge-baru { background: #FFF7E0; color: #7A5800; border-color: #F5D98B; }
.badge-diproses { background: #EFF8FF; color: #175CD3; border-color: #B2DDFF; }
.badge-disetujui { background: #ECFDF3; color: #05603A; border-color: #A6F4C5; }
.badge-ditolak { background: #FEF3F2; color: #912018; border-color: #FDA29B; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg-soft); }
.login-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 34px; }
.login-card .lc-head { text-align: center; margin-bottom: 26px; }
.login-card .lc-head img { width: 74px; height: 74px; margin: 0 auto 14px; }
.login-card .lc-head h1 { font-size: 1.15rem; margin-bottom: 6px; }
.login-card .lc-head p { font-size: .85rem; color: var(--muted); margin: 0; }
.login-foot { text-align: center; margin-top: 20px; font-size: .86rem; }
.help-text { font-size: .84rem; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
  .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { padding: 20px; }
  .admin-side nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main { padding: 26px 20px 50px; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; padding-bottom: 48px; }
  .hero h1 { font-size: 1.95rem; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .site-header .container { flex-wrap: wrap; }
  .main-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 11px 12px; }
  .main-nav a.active::after { display: none; }
  .nav-cta .btn { padding: 9px 14px; font-size: .85rem; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.65rem; }
  .section { padding: 46px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .doc-item { flex-direction: column; align-items: flex-start; }
  .cta-strip { padding: 26px 22px; }
  .admin-cards { grid-template-columns: 1fr; }
  .form-card { padding: 24px 20px; }
  .card { padding: 22px; }
}
