:root {
  --teal: #0f766e;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fa;
  --card: #ffffff;
  --up: #15803d;
  --down: #b91c1c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

h1, h2 { margin: 0 0 .5rem; font-weight: 700; }
h2 { font-size: 1rem; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.num { text-align: right; }

/* ---------- Login ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(160deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 18px 45px rgba(2, 44, 40, .32);
}
.brand { text-align: center; margin-bottom: 18px; }
.brand-mark {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  letter-spacing: .14em;
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.login-card h1 { font-size: 1.15rem; }
.login-card .muted { font-size: .85rem; margin: 0; }

form label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 14px 0 6px;
}
input[type="text"], input[type="password"], input[type="month"] {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
input:focus { outline: 2px solid var(--teal-600); outline-offset: 1px; border-color: var(--teal-600); }

button {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
button:active { transform: translateY(1px); }
button[disabled] { opacity: .6; cursor: default; }
.ghost {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  font-size: .85rem;
  font-weight: 600;
}
.msg { min-height: 1.1em; margin: 10px 0 0; font-size: .85rem; color: var(--down); }
.foot { text-align: center; font-size: .78rem; margin: 16px 0 0; }

/* ---------- App ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--teal);
  color: #fff;
}
.topbar-title { font-weight: 700; }
.topbar .muted { color: rgba(255, 255, 255, .82); }
.wrap { padding: 14px 14px 40px; max-width: 720px; margin: 0 auto; }

.row-between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.period { display: flex; flex-direction: column; gap: 4px; }
.period input { padding: 8px 10px; font-size: .9rem; width: 165px; }
.badge {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--teal-100);
  color: var(--teal);
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
}
.card .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card .value { font-size: 1.5rem; font-weight: 800; margin-top: 3px; }
.card.wide { grid-column: 1 / -1; }
.up { color: var(--up); font-size: .8rem; font-weight: 700; }
.down { color: var(--down); font-size: .8rem; font-weight: 700; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.trend { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 6px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.trend .bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.trend .bar { width: 42%; border-radius: 4px 4px 0 0; min-height: 3px; }
.bar-k { background: var(--teal-600); }
.bar-s { background: #f59e0b; }
.trend .plabel { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: .78rem; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot-k { background: var(--teal-600); }
.dot-s { background: #f59e0b; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td.nama { font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.list li:last-child { border-bottom: 0; }
.list .who { font-weight: 600; }
.list .why { color: var(--muted); font-size: .82rem; }
