@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  /* ===== INK SYSTEM ===== */
  --ink:#101114;
  --muted:#5a6170;
  --muted-2:#7a8191;

  /* ===== PAPER ===== */
  --paper:#f5f2ec;
  --paper-2:#f9f7f3;

  /* ===== GLASS ===== */
  --card:#ffffffcc;
  --card-soft:#ffffffb8;

  /* ===== LINES ===== */
  --line:#e6e1d8;
  --line-soft:rgba(0,0,0,.06);

  /* ===== STATES (NO TEXT COLOR) ===== */
  --ok:rgba(0,0,0,.12);
  --warn:rgba(0,0,0,.22);
  --bad:rgba(0,0,0,.30);

  /* ===== RADIUS ===== */
  --r-lg:22px;
  --r-md:16px;
  --r-sm:12px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background: var(--paper);
  overflow-x:hidden;
}

/* =================================================
   BACKGROUND (shared for all pages)
   ================================================= */
.bg{
  position:fixed;
  inset:-40px;
  z-index:-2;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(0,0,0,.06), transparent 62%),
    radial-gradient(760px 520px at 85% 18%, rgba(0,0,0,.04), transparent 62%),
    radial-gradient(900px 600px at 50% 92%, rgba(0,0,0,.05), transparent 65%),
    linear-gradient(180deg, var(--paper-2), var(--paper));
}

body::before{
  content:"";
  position:fixed;
  inset:-60px;
  z-index:-1;
  backdrop-filter: blur(34px) saturate(130%);
  -webkit-backdrop-filter: blur(34px) saturate(130%);
}

/* subtle grain */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.06;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.4) 0, rgba(0,0,0,.4) 1px, transparent 1px, transparent 6px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.3) 0, rgba(0,0,0,.3) 1px, transparent 1px, transparent 7px);
  mix-blend-mode: soft-light;
}

/* =================================================
   LAYOUT
   ================================================= */
.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:28px 20px 22px;
}

/* =================================================
   HEADER
   ================================================= */
.hdr{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.brand-mark{
  font-size:22px;
  font-weight:800;
  letter-spacing:.22em;
}
.brand-sub{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}

/* =================================================
   PROFILE
   ================================================= */
.me{
  display:flex;
  align-items:center;
  gap:12px;
}
.me-ava{
  width:46px;
  height:46px;
  border-radius:999px;
  object-fit:cover;
  background:#fff;
  border:1px solid var(--line-soft);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}
.me-name{
  font-weight:700;
  font-size:13px;
}
.me-meta{
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
}
.dot{ margin:0 6px; opacity:.5; }

.iconbtn{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  text-decoration:none;
  color:var(--ink);
  background: rgba(255,255,255,.6);
  border:1px solid var(--line-soft);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.iconbtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,.10);
}

/* =================================================
   GRID SYSTEM
   ================================================= */
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:16px;
}
.grid.three{
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.grid.two{
  grid-template-columns: repeat(2, minmax(0,1fr));
}

/* =================================================
   CARD (GLOBAL)
   ================================================= */
.card{
  display:block;
  text-decoration:none;
  color:inherit;

  background: var(--card);
  border:1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding:18px 18px 16px;

  box-shadow:
    0 16px 34px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.8);

  transition: transform .16s ease, box-shadow .16s ease;
  position:relative;
  overflow:hidden;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.85);
}

/* subtle sheen */
.card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background: radial-gradient(circle, rgba(255,255,255,.6), transparent 58%);
  transform: translate(-30%, -30%);
  opacity:.25;
  pointer-events:none;
}

/* =================================================
   CARD HEADER
   ================================================= */
.card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.card-title{
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
}

/* =================================================
   PILLS (neutral)
   ================================================= */
.pill{
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.7);
  border:1px solid var(--line-soft);
  color:var(--ink);
}
.pill.soft{
  background: rgba(255,255,255,.55);
}

/* =================================================
   METRICS
   ================================================= */
.metric-big{
  font-size:26px;
  font-weight:800;
  letter-spacing:-0.02em;
}
.metric-sub{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}

/* =================================================
   BAR (health, progress, goals)
   ================================================= */
.bar{
  margin-top:12px;
  height:10px;
  background: rgba(16,17,20,.08);
  border-radius:999px;
  overflow:hidden;
}
.bar-fill{
  height:100%;
  width:50%;
  background: rgba(16,17,20,.45);
  border-radius:999px;
}

/* =================================================
   LIST / LOG
   ================================================= */
.list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 14px;
  background: var(--card-soft);
  border:1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.itext{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.kicker{
  font-size:11px;
  font-weight:600;
  letter-spacing:.04em;
  color:var(--muted-2);
}
.title{
  font-size:14px;
  font-weight:600;
}
.meta{
  font-size:12px;
  color:var(--muted);
}

/* =================================================
   FORMS (shared)
   ================================================= */
.form{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.field label{
  font-size:12px;
  color:var(--muted);
}
.field input,
.field select{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line-soft);
  background: rgba(255,255,255,.7);
  font-size:14px;
  font-family:inherit;
  color:var(--ink);
}
.field input:focus{
  outline:none;
  border-color: rgba(0,0,0,.25);
}





/* ==============================
   Segmented Control (Income / Expense)
   ============================== */

.segmented{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}

.segmented label{
  position:relative;
  cursor:pointer;
}

.segmented input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.seg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 16px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;

  background: rgba(255,255,255,.6);
  border:1px solid rgba(0,0,0,.08);
  color: var(--muted);

  transition:
    background .15s ease,
    color .15s ease,
    box-shadow .15s ease,
    transform .12s ease;
}

/* ACTIVE STATE */
.segmented input:checked + .seg{
  background: #fff;
  color: var(--ink);
  border-color: rgba(0,0,0,.14);
  box-shadow:
    0 6px 14px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* SUBTLE PRESS */
.segmented input:checked + .seg::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:999px;
  pointer-events:none;
}

/* HOVER (non active) */
.segmented label:hover .seg{
  background: rgba(255,255,255,.8);
}


/* =================================================
   BUTTONS
   ================================================= */
.btn{
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--line-soft);
  background: rgba(255,255,255,.85);
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
}
.btn.full{ width:100%; }
.btn:hover{ background:#fff; }

/* =================================================
   CTA TEXT
   ================================================= */
.card-cta{
  margin-top:14px;
  font-size:12px;
  font-weight:600;
  color: rgba(16,17,20,.65);
}

/* =================================================
   FOOTER
   ================================================= */
.ftr{
  margin-top:18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  color:var(--muted);
  font-size:12px;
}
.hint{ opacity:.9; }
.link{
  color:var(--ink);
  text-decoration:none;
  font-weight:600;
  padding:8px 10px;
  border-radius:12px;
  background: rgba(255,255,255,.55);
  border:1px solid var(--line-soft);
}
.link:hover{ transform: translateY(-1px); }

/* =================================================
   RESPONSIVE
   ================================================= */
@media (max-width:860px){
  .grid,
  .grid.two,
  .grid.three{
    grid-template-columns:1fr;
  }
  .hdr{ align-items:flex-start; }
}
/* =========================================
   GLOBAL SPACING & BREATHING PATCH
   (Hub + All Pages)
   ========================================= */

/* SECTION SPACING */
section{
  margin-bottom:28px;
}

/* GRID — LEBIHH LEGA */
.grid{
  gap:26px; /* sebelumnya 16px */
}

/* GRID KHUSUS HALAMAN TOOL (2 KOLOM) */
.grid.two{
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:30px;
}

/* CARD — TAMBAH NAFAS */
.card{
  padding:24px 24px 22px; /* sebelumnya 18px */
}

/* CARD HEADER */
.card-top{
  margin-bottom:16px;
}

/* FORM SPACING */
.form{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* FIELD */
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* LIST (RECENT RECORDS, dll) */
.list{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* ITEM DALAM LIST */
.item{
  padding:18px 18px;
  border-radius: var(--r2);
}

/* METRIC BLOCK */
.metric{
  padding:6px 0;
}

/* CTA JARAK */
.card-cta{
  margin-top:18px;
}

/* FOOTER */
.ftr{
  margin-top:26px;
}

/* MOBILE — LEBIH LEGA */
@media (max-width:860px){
  .wrap{
    padding:26px 18px 22px;
  }

  .grid,
  .grid.two{
    grid-template-columns:1fr;
    gap:24px;
  }

  .card{
    padding:22px;
  }
}
