/* ====== Theme Tokens ====== */
:root{
  --bg-0: #eef7f2;
  --bg-1: #f6fbf8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eef0;

  --primary: #16a34a;       /* hijau tombol */
  --primary-2: #22c55e;     /* hijau gradien */
  --primary-ink: #ffffff;

  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
  --radius: 18px;
}

/* ====== Base ====== */
*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% 0%, var(--bg-1), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, #eaf6ef, transparent 55%),
    linear-gradient(180deg, var(--bg-0), #ffffff 70%);
}

/* ====== Layout (Auth) ====== */
.auth{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 42px 16px;
}
.card{
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid rgba(230, 238, 240, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
}
.card__header{ margin-bottom: 14px; }
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.brand__icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, .10);
  color: var(--primary);
}
.brand__title{
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: .2px;
}
.brand__subtitle{
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.card__desc{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ====== Form ====== */
.form{ margin-top: 16px; display: grid; gap: 14px; }
.field__label{
  display: inline-block;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.input{
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus-within{
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.input__icon{
  color: #94a3b8;
  display: grid;
  place-items: center;
}
.input__control{
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 16px;
  padding: 0;
  color: var(--text);
  background: transparent;
}
.input__control::placeholder{ color: #9aa9bb; }

.input--with-action{ padding-right: 6px; }
.input__action{
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #64748b;
  transition: transform .08s ease, background .15s ease;
}
.input__action:active{ transform: scale(.98); }
.input__action:hover{ background: #f8fafc; }

.form__row{
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.link{
  color: #16a34a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.link:hover{ text-decoration: underline; }

/* ====== Buttons ====== */
.btn{
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .08s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  color: var(--primary-ink);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(34,197,94,.22);
}
.btn--primary:hover{ filter: brightness(0.98); }
.btn--ghost{
  background: #ffffff;
  border-color: var(--line);
  color: #0f172a;
}
.btn--ghost:hover{ background: #f8fafc; }
.btn__icon{ font-weight: 900; line-height: 1; }

.fineprint{
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.fineprint .link{ font-size: 12px; }

/* ====== Helpers lama ====== */
.shell{ width: min(980px, 100%); margin: 0 auto; padding: 22px; }
.topbar{ display:flex; align-items:center; justify-content: space-between; gap:14px; margin-bottom:18px; }
.badge{ display:inline-flex; gap:8px; align-items:center; padding:8px 10px; border:1px solid var(--line); border-radius:999px; background: rgba(255,255,255,.72); }
.grid{ display:grid; gap:14px; grid-template-columns: repeat(12, 1fr); }
.panel{
  grid-column: span 12;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15,23,42,.08);
  padding: 16px;
}
@media (min-width: 860px){
  .panel--8{ grid-column: span 8; }
  .panel--4{ grid-column: span 4; }
}
.field__hint{ color:#94a3b8; font-weight: 600; font-size: 12px; }
.help{ margin: 8px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.divider{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:2px; }
.divider__line{ flex:1; height:1px; background: var(--line); }
.divider__text{ font-size:16px; font-weight:500; color:#0f172a; white-space:nowrap; }

/* =========================================================
   TAMBAHAN DASHBOARD + PROFILE + DEVICES (punyamu sekarang)
   ========================================================= */

/* ====== Dashboard Page ====== */
.page{ padding-bottom: 96px; }

/* Topbar */
.topbar2{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230,238,240,.95);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brandMark{ display:flex; align-items:center; gap:10px; }
.brandMark__icon{
  width: 34px; height: 34px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(34,197,94,.10);
  color: var(--primary);
}
.brandMark__title{ font-weight: 900; font-size: 14px; line-height: 1.1; }
.brandMark__sub{ font-size: 12px; color: var(--muted); line-height: 1.1; }

.logoutBtn{
  border: 1px solid var(--line);
  background: #fff;
  color: #ef4444;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logoutBtn:hover{ background: #fff5f5; }
.logoutBtn__icon{
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,.25);
}

/* Wrapper */
.dashWrap{
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 14px 14px 20px;
}

/* Header */
.dashHeader{ display:flex; align-items:center; gap:10px; margin: 10px 0 12px; }
.dashHeader__icon{
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(34,197,94,.10);
  color: var(--primary);
  display:grid; place-items:center;
  border: 1px solid rgba(34,197,94,.18);
}
.dashHeader__title{ font-weight: 950; font-size: 16px; }
.dashHeader__sub{ color: var(--muted); font-size: 12px; }

/* Mini */
.miniGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.miniCard{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,.06);
  position: relative;
  overflow: hidden;
}
.miniCard__meta{ font-size: 11px; font-weight: 900; letter-spacing: .8px; color: #64748b; }
.miniCard__value{ font-size: 22px; font-weight: 950; margin-top: 4px; }
.miniCard__pill{ position:absolute; right:10px; top:10px; }

.pill{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:grid; place-items:center;
  border: 1px solid rgba(148,163,184,.35);
}
.pill--green{ background: rgba(34,197,94,.12); color:#16a34a; }
.pill--red{ background: rgba(239,68,68,.10); color:#ef4444; }
.pill--mint{ background: rgba(34,197,94,.12); color:#16a34a; }

/* Balance */
.balanceCard{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15,23,42,.07);
  padding: 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}
.balanceCard::after{
  content:"";
  position:absolute;
  right:-40px; top:-40px;
  width:170px; height:170px;
  border-radius:999px;
  background: radial-gradient(circle at 30% 30%, rgba(34,197,94,.22), rgba(34,197,94,0));
}
.balanceCard__head{ display:flex; align-items:center; justify-content: space-between; gap:10px; }
.balanceCard__label{
  font-size:12px; font-weight:950; letter-spacing:.7px;
  color:#64748b; display:flex; align-items:center; gap:8px;
}
.dot{
  width:8px; height:8px; border-radius:999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.balanceCard__value{ font-size:30px; font-weight:950; margin: 10px 0 6px; }
.balanceCard__divider{
  height:1px;
  background: linear-gradient(90deg, rgba(148,163,184,.0), rgba(148,163,184,.65), rgba(148,163,184,.0));
  margin: 10px 0 12px;
}
.balanceCard__grid{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }

.subStat{
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.85);
  position: relative;
  overflow: hidden;
}
.subStat__title{ font-size: 12px; font-weight: 800; color:#64748b; }
.subStat__value{ margin-top: 3px; font-weight: 950; }
.subStat__icon{
  position:absolute;
  right:10px; top:10px;
  width:34px; height:34px;
  border-radius:12px;
  display:grid; place-items:center;
  border: 1px solid rgba(148,163,184,.35);
  font-weight: 900;
}
.subStat__icon--amber{ background: rgba(245,158,11,.12); color:#f59e0b; }
.subStat__icon--blue{ background: rgba(59,130,246,.12); color:#3b82f6; }

/* Warning */
.warn{
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(245,158,11,.25);
  background: rgba(245,158,11,.10);
  margin-bottom: 12px;
}
.warn__title{
  display:flex; align-items:center; gap:8px;
  font-weight: 950; color:#92400e;
  margin-bottom: 6px;
}
.warn__badge{
  width:22px; height:22px;
  border-radius:8px;
  display:grid; place-items:center;
  background: rgba(245,158,11,.18);
  border: 1px solid rgba(245,158,11,.30);
}
.warn__text{ color:#b45309; font-size: 12.5px; line-height: 1.45; }

/* Today */
.today{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15,23,42,.06);
  padding: 12px;
  margin-bottom: 12px;
}
.today__head{ display:flex; justify-content: space-between; align-items:center; margin-bottom: 8px; }
.today__title{ font-weight: 950; }
.today__right{ color:#64748b; font-size: 12px; font-weight: 800; }
.today__list{
  border-left: 2px solid rgba(148,163,184,.35);
  margin-left: 10px;
  padding-left: 10px;
}

.rowItem{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148,163,184,.40);
}
.rowItem--last{ border-bottom: 0; }
.rowItem__left{ display:flex; align-items:center; gap:10px; min-width:0; }
.rowItem__title{ font-weight: 950; font-size: 14px; }
.rowItem__sub{ color:#64748b; font-size:12px; font-weight:700; }
.rowItem__right{ text-align:right; }
.rowItem__num{ font-weight: 950; }
.rowItem__tag{ color:#64748b; font-size:11px; font-weight:800; }

.av{
  width:36px; height:36px;
  border-radius:14px;
  display:grid; place-items:center;
  border: 1px solid rgba(148,163,184,.35);
  font-weight: 900;
}
.av--green{ background: rgba(34,197,94,.12); color:#16a34a; }
.av--red{ background: rgba(239,68,68,.10); color:#ef4444; }
.av--blue{ background: rgba(59,130,246,.12); color:#3b82f6; }
.av--amber{ background: rgba(245,158,11,.12); color:#f59e0b; }

/* CTA */
.ctaCard{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15,23,42,.06);
  padding: 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.ctaCard__left{ display:flex; align-items:center; gap: 12px; }
.ctaCard__badge{
  width:44px; height:44px;
  border-radius:16px;
  display:grid; place-items:center;
  background: rgba(99,102,241,.12);
  color:#4f46e5;
  border: 1px solid rgba(99,102,241,.20);
  font-weight: 950;
}
.ctaCard__small{ font-size:11px; font-weight:950; letter-spacing:.7px; color:#64748b; }
.ctaCard__title{ font-weight: 950; }
.ctaCard__go{
  width:44px; height:44px;
  border-radius:16px;
  border: 1px solid rgba(148,163,184,.35);
  background: #0f172a;
  color:#fff;
  cursor:pointer;
  font-size: 18px;
}
.ctaCard__go:hover{ filter: brightness(1.05); }

/* Floating */
.fab{
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 30;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 40px rgba(34,197,94,.35);
  cursor: pointer;
  font-size: 18px;
}
.fab:active{ transform: translateY(1px); }

/* Bottom nav */
.bottomNav{
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 25;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(230,238,240,.95);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 10px 12px;
  gap: 6px;
}
.bottomNav__item{
  text-decoration: none;
  color: #64748b;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 11px;
}
.bottomNav__icon{
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.70);
  font-size: 16px;
}
.bottomNav__item--active{ color: #0f172a; }
.bottomNav__item--active .bottomNav__icon{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.12);
  color: #16a34a;
}
.bottomNav__item--center .bottomNav__icon{
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: rgba(34,197,94,.35);
  transform: translateY(-8px);
  box-shadow: 0 14px 30px rgba(34,197,94,.25);
}
.bottomNav__item--center .bottomNav__text{ margin-top: -8px; }

/* ====== Profile Page ====== */
.pageHead{ display:flex; align-items:center; gap:10px; margin: 12px 0 14px; }
.pageHead__icon{
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(34,197,94,.10);
  color: var(--primary);
  display:grid; place-items:center;
  border: 1px solid rgba(34,197,94,.18);
}
.pageHead__title{ font-weight: 950; font-size: 16px; }
.pageHead__sub{ color: var(--muted); font-size: 12px; }

.profileGrid{ display:grid; gap: 12px; align-items: start; }
@media (min-width: 900px){
  .dashWrap{ width: min(980px, 100%); }
  .profileGrid{ grid-template-columns: 1.2fr .9fr; grid-auto-rows: min-content; }
  .profileGrid > article:nth-child(2){ grid-column: 2; }
  .profileGrid > article:nth-child(3){ grid-column: 2; }
}
.pCard{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(230,238,240,.95);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15,23,42,.06);
  padding: 14px;
}
.pCard__top{ display:flex; justify-content: space-between; align-items:center; gap:10px; margin-bottom: 12px; }
.pCard__title{ display:flex; align-items:center; gap: 10px; font-weight: 950; }
.pIcon{
  width:34px; height:34px;
  border-radius:14px;
  background: rgba(148,163,184,.12);
  display:grid; place-items:center;
  border: 1px solid rgba(148,163,184,.28);
  color:#0f172a;
  font-weight: 900;
}
.chip{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.75);
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}
.pForm{ display:grid; gap: 12px; }
.pRow2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px){ .pRow2{ grid-template-columns: 1fr; } }
.pRow2--gap{ padding-top: 4px; border-top: 1px solid rgba(230,238,240,.95); }
.pField{ display:grid; gap: 8px; }
.pLabel{ font-size: 12px; color:#0f172a; font-weight: 900; }
.pInput{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background:#fff;
  outline: none;
  font-size: 14px;
}
.pInput:focus{
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}
.pInput--readonly{ background: rgba(148,163,184,.12); }
.pHint{ font-size:12px; color: var(--muted); font-weight: 700; line-height: 1.35; }
.pLink{ color:#2563eb; font-weight: 900; }
.pDanger{ color:#ef4444; font-weight: 900; }

.pActions{ display:flex; justify-content:flex-start; margin-top: 2px; }
.pActions--right{ justify-content:flex-end; }

.pBtnSave{ width:auto; padding: 10px 16px; border-radius: 999px; }
.pBtnWarn{
  width:auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 0;
  background: #fbbf24;
  color: #0f172a;
  font-weight: 950;
  cursor:pointer;
}
.pBtnWarn:hover{ filter: brightness(.98); }
.pBtnWarn:active{ transform: translateY(1px); }

/* ===== DEVICES PAGE ===== */
.devicesActions{ display:flex; gap: 10px; margin-bottom: 12px; }
.devicesSearch input{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.devicesFilter{ display:flex; gap: 10px; margin-bottom: 20px; }
.filterBtn{
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor:pointer;
  font-weight: 700;
}
.filterBtn--active{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
  color: #16a34a;
}
.devicesEmpty{
  text-align:center;
  color: var(--muted);
  font-weight: 600;
  margin-top: 30px;
}
