/* Laporan — Ciptamarine Group */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --bg: #f5f6f8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --green: #16a34a;
  --amber: #d97706;
  --blue: #2563eb;
  --purple: #7c3aed;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.3rem; margin: 0 0 16px; }
h2 { font-size: 1.05rem; margin: 24px 0 12px; }
label { display: block; font-weight: 500; font-size: .875rem; margin-bottom: 12px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* Topbar */
.topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar.admin { background: #111827; border-color: #1f2937; }
.topbar.admin .brand { color: #fff; }
.topbar.admin .brand small { color: #9ca3af; font-weight: 400; }
.brand { font-size: 1.15rem; font-weight: 700; color: var(--brand); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.branch-badge { font-size: .75rem; color: var(--muted); }
.logout { font-size: .875rem; color: var(--muted); }
.topbar.admin .logout { color: #9ca3af; }

.container { max-width: 720px; margin: 0 auto; padding: 16px 16px 90px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; text-align: center; font-size: .75rem; color: var(--muted);
}
.card .num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.card .num.amber { color: var(--amber); }
.card .num.green { color: var(--green); }

/* Sections */
.section { margin-bottom: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-head h2 { margin: 0; }

/* Lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { margin: 0; font-size: .9rem; font-weight: 600; }
.list-item .sub { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.list-item .right { text-align: right; }
.list-item .icon { font-size: 1.4rem; }
.link-color { color: var(--brand); }
.row-baseline { display: flex; align-items: baseline; gap: 8px; }

.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); }
.dot.blue { background: var(--blue); }

/* Tags & status */
.tag {
  font-size: .68rem; padding: 2px 8px; border-radius: 999px;
  background: #eef2ff; color: var(--brand); font-weight: 600;
}
.tag.blue { background: #dbeafe; color: #1d4ed8; }
.tag.purple { background: #ede9fe; color: #6d28d9; }
.status { font-size: .72rem; padding: 3px 10px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.status.lunas { background: #dcfce7; color: #15803d; }
.status.belum { background: #fef3c7; color: #b45309; }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; white-space: nowrap;
  background: #e5e7eb; color: var(--text);
}
.chip.active { background: var(--brand); color: #fff; }

/* Search */
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbar input { margin-top: 0; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px; font-size: .875rem;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-weight: 500;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.small { padding: 5px 10px; font-size: .75rem; }
.btn:hover { border-color: #cbd5e1; }

/* Forms */
.cardform {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 20px;
}

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .875rem; }
.alert.error { background: #fee2e2; color: #b91c1c; }
.alert.success { background: #dcfce7; color: #15803d; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-box {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; width: 100%; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
.login-box h1 { text-align: center; color: var(--brand); }
.login-box .muted { text-align: center; color: var(--muted); margin: -10px 0 20px; font-size: .85rem; }
.login-box input { margin-bottom: 12px; }
.login-box .btn { margin-top: 4px; }

/* Admin card head/foot */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; text-align: left; }
.card-head h2 { margin: 0; font-size: .95rem; }
.stats-row { display: flex; gap: 12px; }
.stat { text-align: center; }
.stat .num { font-size: 1.1rem; }
.stat small { display: block; font-size: .65rem; color: var(--muted); }
.card-foot { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .78rem; }
.money.in { color: var(--green); }
.money.out { color: var(--blue); }
.space-y { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

/* Utils */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.page-head h1 { margin: 0; }

/* Desktop */
@media (min-width: 768px) {
  .container { max-width: 960px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .bottom-nav { max-width: 960px; left: 50%; transform: translateX(-50%); border-radius: 12px 12px 0 0; }
}

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--border); display: flex; z-index: 10;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 10px; font-size: .7rem; color: var(--muted); gap: 2px;
}
.bottom-nav a.active { color: var(--brand); font-weight: 600; }
