/* =========================================================
   Kas. — Stylesheet
   Palet: latar gelap tactical, kartu terang, aksen lime
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #101114;
  --panel: #17181c;
  --panel-2: #1e2024;
  --card: #ffffff;
  --card-muted: #f4f5f7;
  --text: #16171a;
  --text-dim: #8a8d93;
  --text-invert: #f5f6f7;
  --line: #ececef;
  --lime: #c8f169;
  --lime-dark: #a6d94a;
  --purple: #8b7ff0;
  --orange: #f2a93b;
  --blue: #4fa3f7;
  --red: #ff5d7a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(16,17,20,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.num, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Auth screens ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(200,241,105,0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(139,127,240,0.08), transparent 40%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-brand .logo-dot {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--lime);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: 'Space Grotesk';
  color: var(--text);
}
.auth-brand span { font-size: 20px; font-weight: 700; font-family: 'Space Grotesk'; }
.auth-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; font-family: 'Space Grotesk'; }
.auth-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--card-muted);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: var(--lime-dark); background: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--lime); color: #12140c; }
.btn-primary:hover { background: var(--lime-dark); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card-muted); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: #ffe3e8; color: #c81c3c; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.auth-foot { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-dim); }
.auth-foot a { color: var(--lime-dark); font-weight: 600; }

.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px;
}
.alert-error { background: #ffe3e8; color: #c81c3c; }
.alert-success { background: #e8f8d9; color: #4c7a17; }

/* ---------- App shell ---------- */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--panel);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 24px;
}
.sidebar-brand .logo-dot {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--lime); color: #12140c;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: 'Space Grotesk'; font-size: 15px;
}
.sidebar-brand span { color: var(--text-invert); font-weight: 700; font-size: 18px; font-family: 'Space Grotesk'; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b8bac0;
  font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--panel-2); color: var(--text-invert); }
.nav a.active { background: var(--lime); color: #12140c; font-weight: 600; }
.nav .ic { width: 18px; text-align: center; }

.sidebar-foot { border-top: 1px solid #26282d; padding-top: 12px; margin-top: 12px; }
.sidebar-foot a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: #b8bac0; font-size: 14px; }
.sidebar-foot a:hover { background: var(--panel-2); color: var(--text-invert); }

.main {
  flex: 1;
  background: #f7f7f8;
  border-radius: 22px 0 0 22px;
  min-height: 100vh;
  padding: 32px 36px 60px;
  overflow-x: hidden;
}

.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-family: 'Space Grotesk'; font-size: 26px; margin: 0 0 4px; }
.page-head p { color: var(--text-dim); margin: 0; font-size: 14px; }

/* ---------- Cards / widgets ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .sidebar { display: none; } .main { border-radius: 0; padding: 20px; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-muted-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); font-weight: 600; margin: 0 0 8px; }

.hero-dark {
  background: linear-gradient(145deg, #101114, #1a1c20);
  color: var(--text-invert);
  border-radius: var(--radius);
  padding: 28px;
}
.hero-dark .label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #9a9da3; display: flex; align-items: center; gap: 6px; }
.hero-dark .big { font-family: 'Space Grotesk'; font-size: 40px; font-weight: 700; margin: 8px 0; }
.hero-dark .lime { color: var(--lime); }

.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.08); color: #d5d6db; }
.pill-lime { background: rgba(200,241,105,0.15); color: var(--lime); }

.progress-track { height: 8px; border-radius: 99px; background: #eceef0; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; }
.fill-lime { background: var(--lime-dark); }
.fill-purple { background: var(--purple); }
.fill-orange { background: var(--orange); }
.fill-blue { background: var(--blue); }
.fill-red { background: var(--red); }

.list-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row-left { display: flex; align-items: center; gap: 12px; }
.icon-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--card-muted); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.list-title { font-weight: 600; font-size: 14px; }
.list-sub { font-size: 12px; color: var(--text-dim); }
.amount-neg { color: var(--red); font-weight: 600; }
.amount-pos { color: #3fa332; font-weight: 600; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th { text-align: left; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--text-dim); padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }

.btn-fab { background: var(--lime); color: #12140c; font-weight: 700; padding: 10px 18px; border-radius: 10px; border: none; font-size: 14px; }

.wallet-card { border-radius: var(--radius); padding: 18px; background: var(--card); box-shadow: var(--shadow); }
.wallet-card.dark { background: linear-gradient(150deg, #17181c, #0e0f11); color: var(--text-invert); }
.wallet-card .wtitle { font-weight: 700; font-size: 15px; }
.wallet-card .wtype { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.wallet-card.dark .wtype { color: #9a9da3; }
.wallet-card .wbal { font-family: 'Space Grotesk'; font-size: 20px; font-weight: 700; margin-top: 10px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(16,17,20,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); padding: 26px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-family: 'Space Grotesk'; font-size: 19px; margin: 0 0 18px; }
.modal-close { float: right; background: none; border: none; font-size: 18px; color: var(--text-dim); }

.tab-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-dim); }
.tab-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty-state .em-icon { font-size: 32px; margin-bottom: 10px; }

.section-title { display: flex; align-items: center; gap: 8px; font-family: 'Space Grotesk'; font-weight: 700; font-size: 17px; margin: 28px 0 14px; }

.donut-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.donut-legend .lg-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.donut-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
