/* =========================================================
   DompetKu — styles.css
   ========================================================= */

:root{
  --bg: #0c0d14;
  --bg-elevated: #15161f;
  --bg-elevated-2: #1b1c28;
  --border: #262735;
  --border-soft: #1f2029;

  --text-primary: #f5f6fa;
  --text-secondary: #9497ad;
  --text-tertiary: #6b6e85;

  --green: #22c55e;
  --green-dark: #16a34a;
  --green-bg: #123321;
  --red: #ef4444;
  --red-dark: #dc2626;
  --red-bg: #3a1414;
  --violet: #6d5ef5;
  --blue: #4a7dff;
  --amber: #f5a623;
  --gray-tile: #2a2c3a;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --phone-w: 430px;
}
html.theme-light{
  --bg:#f5f6fa;
  --bg-elevated:#ffffff;
  --bg-elevated-2:#eef0f6;
  --border:#dfe2eb;
  --border-soft:#e7e9f0;
  --text-primary:#171923;
  --text-secondary:#666b7d;
  --text-tertiary:#8b90a2;
}

*, *::before, *::after{ box-sizing: border-box; }

html, body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  background:var(--bg);
  font-family: var(--font);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow:hidden;
  overscroll-behavior:none;
}

button, input, textarea, select{
  font-family: inherit;
  color: inherit;
}

button{
  cursor:pointer;
  background:none;
  border:none;
  padding:0;
}

a{ color: inherit; }

::-webkit-scrollbar{ width:0; height:0; }

/* =========================================================
   APP GRID — shows all screens like a design gallery,
   but only one is "active" (interactive/visible) at a time
   ========================================================= */

#app{
  display:block;
  width:100vw;
  height:100svh;
  min-height:100svh;
  overflow:hidden;
  background:var(--bg);
}

.screen{
  display:none;
  width:100%;
  height:100%;
  min-height:0;
  align-items:stretch;
  justify-content:stretch;
  padding:0;
}

.screen.is-active{
  display:flex;
}

.phone-frame{
  position:relative;
  width:100%;
  max-width:none;
  height:100%;
  min-height:0;
  background:var(--bg);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  margin:0;
}

.bottomnav-slot{ flex-shrink:0; }

.screen__scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  display:flex;
  flex-direction:column;
  padding-bottom:32px;
}

.screen__scroll--center{
  justify-content:flex-start;
}


/* =========================================================
   BOTTOM NAV
   ========================================================= */

.bottomnav{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-around;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(13,14,20,0.97);
  border-top:1px solid var(--border-soft);
  flex-shrink:0;
  z-index:5;
}

.bottomnav__item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  color: var(--text-tertiary);
  font-size:11px;
  font-weight:500;
  min-width:52px;
  padding:4px 0;
  transition: color .15s ease;
}
.bottomnav__item.is-active{ color: var(--violet); }
.bottomnav__icon{ width:22px; height:22px; }

.bottomnav__fab{
  width:52px;
  height:52px;
  border-radius:50%;
  background: linear-gradient(145deg, #7b6ef7, #4a63f0);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 18px -4px rgba(109,94,245,.55);
  transform: translateY(-14px);
  flex-shrink:0;
  transition: transform .12s ease;
}
.bottomnav__fab svg{ width:22px; height:22px; }
.bottomnav__fab:active{ transform: translateY(-14px) scale(.92); }

/* =========================================================
   LANDING SCREEN
   ========================================================= */

.landing{
  padding: 8px 28px 28px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  width:100%;
  flex:1;
}

.landing__logo{
  width:64px;
  height:64px;
  border-radius:18px;
  background: linear-gradient(155deg, #6d5ef5, #4a63f0);
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 18px 0 22px;
  box-shadow: 0 10px 24px -8px rgba(109,94,245,.6);
}

.landing__title{
  font-size:26px;
  line-height:1.25;
  font-weight:800;
  margin:0 0 10px;
  letter-spacing:-0.3px;
}

.landing__subtitle{
  font-size:14.5px;
  line-height:1.55;
  color: var(--text-secondary);
  max-width:290px;
  margin:0 0 28px;
}

.landing__art{
  width:100%;
  max-width:280px;
  margin: 0 auto 32px;
}
.landing__art-svg{ width:100%; height:auto; display:block; }

.landing__cta{ margin-bottom:16px; }

.btn-link{
  font-size:14px;
  font-weight:600;
  color: #8b93ff;
  padding:8px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:15px;
  border-radius: 14px;
  padding: 15px 22px;
  transition: transform .1s ease, opacity .1s ease, background .15s ease;
  border:none;
}
.btn:active{ transform: scale(.97); }
.btn--block{ width:100%; }
.btn--sm{ padding:10px 16px; font-size:13.5px; border-radius:10px; }

.btn--primary{
  background: linear-gradient(90deg, #6d5ef5, #4a7dff);
  color:#fff;
  box-shadow: 0 10px 20px -8px rgba(74,125,255,.55);
}
.btn--primary:disabled{ opacity:.5; box-shadow:none; }

.btn--outline{
  background: transparent;
  border: 1.5px solid #3a3d52;
  color: var(--text-primary);
  flex:1;
}

.btn--danger{
  background: var(--red);
  color:#fff;
  flex:1;
  box-shadow: 0 10px 20px -8px rgba(239,68,68,.45);
}

/* =========================================================
   TOP BARS
   ========================================================= */

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding: 14px 20px 16px;
  flex-shrink:0;
}

.topbar--home{ align-items:center; }

.topbar__greeting{
  font-size:21px;
  font-weight:800;
  margin:0 0 4px;
  letter-spacing:-0.2px;
}
.wave{ display:inline-block; }

.topbar__subtitle{
  font-size:13px;
  color: var(--text-secondary);
  margin:0;
}

.topbar__title{
  font-size:22px;
  font-weight:800;
  margin:0 0 4px;
  letter-spacing:-0.2px;
}

.topbar__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.iconbtn{
  width:38px;
  height:38px;
  border-radius:50%;
  background: var(--bg-elevated);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--text-secondary);
  position:relative;
}
.iconbtn svg{ width:18px; height:18px; }
.iconbtn__dot{
  position:absolute;
  top:8px; right:9px;
  width:7px; height:7px;
  border-radius:50%;
  background: var(--red);
  border:1.5px solid var(--bg);
}

.avatar{
  width:38px; height:38px;
  border-radius:50%;
  overflow:hidden;
  flex-shrink:0;
  border: 1.5px solid var(--border);
}
.avatar svg{ width:100%; height:100%; display:block; }

.topbar--form{
  align-items:center;
  gap:14px;
  padding: 14px 20px 18px;
}
.backbtn{
  width:34px; height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #8b93ff;
  flex-shrink:0;
  margin-left:-6px;
}
.backbtn svg{ width:22px; height:22px; }
.topbar--form .topbar__title{ margin:0; font-size:19px; flex:1; min-width:0; }
.history-delete-all{
  border:1px solid rgba(239,68,68,.28);
  background:transparent;
  color:#ef4444;
  border-radius:10px;
  padding:8px 10px;
  font-size:11.5px;
  font-weight:800;
  white-space:nowrap;
  flex-shrink:0;
}
.history-delete-all:active{ transform:scale(.96); }

/* =========================================================
   DATE PICKER PILL
   ========================================================= */

.datepicker{
  display:flex;
  align-items:center;
  gap:8px;
  margin: 0 20px 18px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 12px;
  font-size:13.5px;
  font-weight:600;
  color: var(--text-primary);
  width:fit-content;
  border: 1px solid var(--border-soft);
}
.datepicker svg{ color: var(--text-secondary); flex-shrink:0; }
.datepicker .chev{ margin-left:2px; }

/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.summary-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  padding: 0 20px 22px;
}

.summary-card{
  border-radius: var(--radius-md);
  padding: 16px 16px 15px;
  position:relative;
  overflow:hidden;
}

.summary-card--in{
  background: linear-gradient(155deg, #1f9c53, #14803f);
}
.summary-card--out{
  background: linear-gradient(155deg, #e34848, #c8302f);
}

.summary-card--flat{
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}
.summary-card--flat .summary-card__label{ color: var(--text-secondary); }
.summary-card--flat.summary-card--in .summary-card__value{ color: var(--green); }
.summary-card--flat.summary-card--out .summary-card__value{ color: var(--red); }

.summary-card__icon{
  width:30px; height:30px;
  border-radius:50%;
  background: rgba(255,255,255,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:26px;
}
.summary-card__icon svg{ width:16px; height:16px; }

.summary-card__label{
  font-size:12px;
  color: rgba(255,255,255,.85);
  margin:0 0 4px;
  font-weight:500;
}
.summary-card__value{
  font-size:16px;
  font-weight:800;
  margin:0;
  color:#fff;
  letter-spacing:-0.2px;
}

/* =========================================================
   SECTION HEADING
   ========================================================= */

.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 20px 12px;
}
.section-heading--tight{ padding: 4px 20px 10px; }
.section-heading h2{
  font-size:16px;
  font-weight:700;
  margin:0;
}
.link-btn{
  display:flex;
  align-items:center;
  gap:2px;
  font-size:12.5px;
  font-weight:600;
  color: var(--violet);
}
.link-btn svg{ color: var(--violet); }

/* =========================================================
   TRANSACTION LIST
   ========================================================= */

.tx-list{
  display:flex;
  flex-direction:column;
  padding: 0 20px;
  gap:2px;
}

.tx-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 11px 0;
  text-align:left;
  width:100%;
}

.tx-row__icon{
  width:42px; height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.tx-row__icon svg{ width:19px; height:19px; }
.tx-row__icon--in{ background: var(--green); }
.tx-row__icon--out{ background: var(--red); }

.tx-row__body{
  flex:1;
  min-width:0;
}
.tx-row__title{
  font-size:14.5px;
  font-weight:700;
  margin:0 0 2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tx-row__category{
  font-size:12px;
  margin:0;
  font-weight:500;
}
.tx-row__category--in{ color: var(--green); }
.tx-row__category--out{ color: var(--red); }

.tx-row__right{
  text-align:right;
  flex-shrink:0;
}
.tx-row__amount{
  font-size:14px;
  font-weight:700;
  margin:0 0 2px;
}
.tx-row__amount--in{ color: var(--green); }
.tx-row__amount--out{ color: var(--red); }
.tx-row__time{
  font-size:11px;
  color: var(--text-tertiary);
  margin:0;
}

.tx-empty{
  text-align:center;
  padding: 40px 24px;
  color: var(--text-tertiary);
  font-size:13.5px;
  line-height:1.6;
}

.tx-date-group__label{
  font-size:12px;
  font-weight:700;
  color: var(--text-tertiary);
  padding: 14px 20px 6px;
  text-transform:uppercase;
  letter-spacing:.4px;
}

/* =========================================================
   MENU GRID
   ========================================================= */

.menu-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  padding: 6px 20px 20px;
}

.menu-tile{
  aspect-ratio: 1.55 / 1;
  border-radius: var(--radius-md);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  padding: 16px;
  transition: transform .1s ease;
}
.menu-tile:active{ transform: scale(.96); }

.menu-tile--violet{ background: #2c2a52; }
.menu-tile--blue{ background: #1e2c4d; }
.menu-tile--green{ background: #163a2a; }
.menu-tile--red{ background: #43222a; }
.menu-tile--amber{ background: #3d3120; }
.menu-tile--gray{ background: #23242f; }

.menu-tile__icon{
  width:38px; height:38px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.menu-tile__icon svg{ width:19px; height:19px; }
.menu-tile--violet .menu-tile__icon{ background:#6d5ef5; }
.menu-tile--blue .menu-tile__icon{ background:#3d7bf5; }
.menu-tile--green .menu-tile__icon{ background:#22c55e; }
.menu-tile--red .menu-tile__icon{ background:#ef4444; }
.menu-tile--amber .menu-tile__icon{ background:#f5a623; }
.menu-tile--gray .menu-tile__icon{ background:#7d8092; }

.menu-tile__label{
  font-size:13.5px;
  font-weight:700;
  color: var(--text-primary);
}

/* =========================================================
   FORM (Tambah Transaksi)
   ========================================================= */

.form{
  padding: 4px 20px 24px;
  display:flex;
  flex-direction:column;
}

.segmented{
  display:flex;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding:4px;
  margin-bottom:22px;
}
.segmented__btn{
  flex:1;
  padding:10px 0;
  border-radius:9px;
  font-size:13.5px;
  font-weight:700;
  color: var(--text-secondary);
  text-align:center;
  transition: background .15s ease, color .15s ease;
}
.segmented__btn.is-active.segmented__btn--in{
  background: var(--green);
  color:#06170d;
}
.segmented__btn.is-active.segmented__btn--out{
  background: var(--red);
  color:#2c0a0a;
}

.field{
  display:block;
  margin-bottom:18px;
}
.field__label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color: var(--text-secondary);
  margin-bottom:8px;
}

.field__input, .field__textarea{
  width:100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size:14.5px;
  font-weight:600;
  color: var(--text-primary);
  outline:none;
  transition: border-color .15s ease;
}
.field__input:focus, .field__textarea:focus{ border-color: var(--violet); }
.field__textarea{ resize:none; font-weight:500; line-height:1.5; }
.field__textarea::placeholder, .field__input::placeholder{ color: var(--text-tertiary); font-weight:500; }

.field__prefix-wrap{
  position:relative;
  display:flex;
  align-items:center;
}
.field__prefix{
  position:absolute;
  left:16px;
  font-size:14.5px;
  font-weight:700;
  color: var(--text-secondary);
  pointer-events:none;
}
.field__input--prefixed{ padding-left:42px; }

.field__select{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size:14.5px;
  font-weight:600;
  text-align:left;
  color: var(--text-primary);
}
.field__select svg{ color: var(--text-tertiary); flex-shrink:0; }
.field__select-icon{ display:flex; align-items:center; margin-right:10px; color:var(--text-secondary); }
.field__select-icon + span{ margin-right:auto; }

.native-date-hidden{
  position:absolute;
  width:1px; height:1px;
  opacity:0;
  pointer-events:none;
}

.field-error{
  color: var(--red);
  font-size:12.5px;
  font-weight:600;
  margin: -8px 0 14px;
}

.form__submit{ margin-top:8px; }

/* =========================================================
   DETAIL SCREEN
   ========================================================= */

.detail-hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding: 10px 24px 26px;
}
.detail-hero__icon{
  width:64px; height:64px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
}
.detail-hero__icon svg{ width:28px; height:28px; }
.detail-hero__icon--in{ background: var(--green); }
.detail-hero__icon--out{ background: var(--red); }

.detail-hero__name{
  font-size:19px;
  font-weight:800;
  margin:0 0 6px;
}
.tag{
  font-size:12px;
  font-weight:700;
  padding:3px 10px;
  border-radius:20px;
}
#detail-type-tag.tag--in{ color: var(--green); background: var(--green-bg); }
#detail-type-tag.tag--out{ color: var(--red); background: var(--red-bg); }

.detail-hero__amount{
  font-size:28px;
  font-weight:800;
  margin: 14px 0 6px;
  letter-spacing:-0.5px;
}
.detail-hero__amount.is-in{ color: var(--green); }
.detail-hero__amount.is-out{ color: var(--red); }

.detail-hero__meta{
  font-size:13px;
  color: var(--text-tertiary);
  margin:0;
}

.detail-info{
  margin: 0 20px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 6px 18px;
}
.detail-info__row{
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.detail-info__row:last-child{ border-bottom:none; }
.detail-info__label{
  font-size:12px;
  color: var(--text-tertiary);
  margin:0 0 4px;
  font-weight:500;
}
.detail-info__value{
  font-size:14.5px;
  font-weight:700;
  margin:0;
}

.detail-actions{
  display:flex;
  gap:12px;
  padding: 0 20px;
}

/* =========================================================
   STATISTIK / CHART
   ========================================================= */

.chart-card{
  margin: 0 20px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 14px 14px;
}
.bar-chart{ width:100%; height:auto; display:block; }

.chart-legend{
  display:flex;
  justify-content:center;
  gap:22px;
  margin-top:8px;
}
.chart-legend__item{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color: var(--text-secondary);
  font-weight:500;
}
.dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.dot--in{ background: var(--green); }
.dot--out{ background: var(--red); }

.category-list{
  padding: 0 20px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.category-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.category-row__icon{
  width:38px; height:38px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.category-row__icon svg{ width:17px; height:17px; }
.category-row__body{ flex:1; min-width:0; }
.category-row__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}
.category-row__name{ font-size:13.5px; font-weight:700; }
.category-row__percent{ font-size:12px; font-weight:700; color: var(--text-secondary); }
.category-row__bar{
  height:6px;
  border-radius:4px;
  background: var(--bg-elevated-2);
  overflow:hidden;
}
.category-row__bar-fill{
  height:100%;
  border-radius:4px;
  background: var(--red);
}
.category-row__amount{
  font-size:12px;
  color: var(--text-tertiary);
  margin-top:5px;
}

/* =========================================================
   RIWAYAT — search + filters
   ========================================================= */

.searchbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 0 20px 14px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--text-tertiary);
}
.searchbar input{
  border:none;
  background:none;
  outline:none;
  flex:1;
  font-size:14px;
  color: var(--text-primary);
  font-weight:500;
}
.searchbar input::placeholder{ color: var(--text-tertiary); }

.filter-row{
  display:flex;
  gap:8px;
  padding: 0 20px 8px;
  overflow-x:hidden;
  overflow-y:visible;
  flex-shrink:0;
  min-height:42px;
}
.filter-chip{
  padding: 8px 16px;
  min-height:36px;
  border-radius:20px;
  font-size:12.5px;
  font-weight:700;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space:nowrap;
  flex-shrink:0;
  border: 1px solid var(--border-soft);
}
.filter-chip.is-active{
  background: var(--violet);
  color:#fff;
  border-color: var(--violet);
}

/* =========================================================
   KATEGORI SCREEN
   ========================================================= */

.category-chip-list{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  padding: 0 20px 18px;
}
.category-chip{
  display:flex;
  align-items:center;
  gap:7px;
  padding: 9px 14px;
  border-radius:20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  font-size:13px;
  font-weight:600;
}
.category-chip__dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.category-chip__remove{
  color: var(--text-tertiary);
  font-size:15px;
  line-height:1;
  margin-left:2px;
  padding:2px;
}
.category-chip__remove:hover{ color: var(--red); }

.inline-add{
  display:flex;
  gap:8px;
  padding: 12px 20px 24px;
  margin-top:auto;
}
.inline-add input{
  flex:1;
  min-width:0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius:10px;
  padding:10px 12px;
  font-size:13px;
  outline:none;
  color: var(--text-primary);
}
.inline-add select{
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius:10px;
  padding:10px 8px;
  font-size:12.5px;
  outline:none;
  color: var(--text-primary);
}

/* =========================================================
   ANGGARAN
   ========================================================= */

.anggaran-list{
  padding: 8px 20px 24px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.anggaran-card{
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.anggaran-card__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}
.anggaran-card__name{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:13.5px;
  font-weight:700;
}
.anggaran-card__dot{ width:9px; height:9px; border-radius:50%; }
.anggaran-card__amounts{
  font-size:12px;
  color: var(--text-secondary);
  font-weight:600;
}
.anggaran-card__bar{
  height:7px;
  border-radius:4px;
  background: var(--bg-elevated-2);
  overflow:hidden;
  margin-bottom:8px;
}
.anggaran-card__bar-fill{ height:100%; border-radius:4px; }
.anggaran-card__input-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.anggaran-card__input-row label{ font-size:11.5px; color: var(--text-tertiary); }
.anggaran-card__input-row input{
  flex:1;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-soft);
  border-radius:8px;
  padding:7px 10px;
  font-size:12.5px;
  color: var(--text-primary);
  outline:none;
}

/* =========================================================
   BUKU CATATAN
   ========================================================= */

.notes-page{ padding:4px 20px 32px; }
.notes-date-card{
  background:var(--bg-elevated);
  border:1px solid var(--border-soft);
  border-radius:var(--radius-md);
  padding:16px;
  margin-bottom:18px;
}
.notes-date-card__label{ margin:0 0 4px; font-size:12px; color:var(--text-secondary); font-weight:600; }
.notes-date-card__date{ margin:0; font-size:18px; font-weight:800; }
.notes-field{ display:block; }
.notes-textarea{ min-height:240px; resize:none; }
.notes-status{ min-height:20px; margin:10px 0 0; text-align:center; font-size:12px; color:var(--text-tertiary); }

/* =========================================================
   SETTINGS / PROFIL
   ========================================================= */

.settings-profile{
  display:flex;
  align-items:center;
  gap:14px;
  padding: 6px 20px 24px;
}
.settings-profile--big{ padding-top:14px; }
.settings-profile__avatar{
  width:52px; height:52px;
  border-radius:50%;
  overflow:hidden;
  flex-shrink:0;
  border: 1.5px solid var(--border);
}
.settings-profile__avatar--lg{ width:64px; height:64px; }
.settings-profile__avatar svg{ width:100%; height:100%; }
.settings-profile__name{ font-size:15.5px; font-weight:800; margin:0 0 2px; }
.settings-profile__email{ font-size:12.5px; color: var(--text-tertiary); margin:0; }

.settings-group{
  margin: 0 20px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 4px 16px;
}
.settings-group__title{
  font-size:11.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  color: var(--text-tertiary);
  padding: 12px 0 6px;
}
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size:14px;
  font-weight:600;
  width:100%;
  text-align:left;
}
.settings-row:last-child{ border-bottom:none; }
.settings-row__value{ color: var(--text-secondary); font-weight:500; font-size:13px; }
.settings-row--btn{ color: var(--text-primary); }
.settings-row--btn svg{ color: var(--text-tertiary); }
.settings-row--danger{ color: var(--red); }

.switch{ position:relative; display:inline-block; width:42px; height:24px; flex-shrink:0; }
.switch input{ opacity:0; width:0; height:0; }
.switch__track{
  position:absolute; inset:0;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-soft);
  border-radius:20px;
  transition: background .15s ease;
}
.switch__track::before{
  content:"";
  position:absolute;
  width:18px; height:18px;
  left:2px; top:2px;
  background:#fff;
  border-radius:50%;
  transition: transform .15s ease;
}
.switch input:checked + .switch__track{ background: var(--violet); border-color: var(--violet); }
.switch input:checked + .switch__track::before{ transform: translateX(18px); }

/* =========================================================
   BOTTOM SHEETS / OVERLAY
   ========================================================= */

.overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  z-index:100;
  opacity:0;
  transition: opacity .2s ease;
}
.overlay.is-visible{ opacity:1; }
.overlay[hidden]{ display:none; }

.sheet{
  display:none;
  width:100%;
  max-width:none;
  background: var(--bg-elevated);
  border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
  max-height:75vh;
  overflow-y:auto;
}
.overlay.is-visible .sheet.is-active{ transform: translateY(0); }
.sheet.is-active{ display:block; }

.sheet__handle{
  width:36px; height:4px;
  background: var(--border);
  border-radius:4px;
  margin: 4px auto 16px;
}
.sheet__title{
  font-size:16px;
  font-weight:800;
  margin: 0 0 14px;
}
.sheet__title--center{ text-align:center; }
.sheet__desc{
  text-align:center;
  font-size:13px;
  color: var(--text-tertiary);
  margin: 0 0 20px;
}

.sheet__list{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.sheet__option{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 13px 4px;
  font-size:14.5px;
  font-weight:600;
  border-bottom: 1px solid var(--border-soft);
  text-align:left;
  width:100%;
}
.sheet__option:last-child{ border-bottom:none; }
.sheet__option.is-selected{ color: var(--violet); }
.sheet__option__dot{ width:10px; height:10px; border-radius:50%; flex-shrink:0; }

.sheet--confirm{ text-align:center; }
.confirm-icon{
  width:52px; height:52px;
  border-radius:50%;
  background: var(--red-bg);
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 6px auto 16px;
}
.sheet__confirm-actions{
  display:flex;
  gap:12px;
  margin-top:4px;
}

/* =========================================================
   TOAST
   ========================================================= */

.toast{
  position:fixed;
  left:50%;
  bottom:110px;
  transform: translateX(-50%) translateY(20px);
  background: #1e1f2b;
  border: 1px solid var(--border);
  color:#fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size:13.5px;
  font-weight:600;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  z-index:200;
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.5);
  max-width: 88%;
  text-align:center;
}
.toast.is-visible{
  opacity:1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   MOBILE-ONLY VIEWPORT
   The app intentionally fills the phone viewport. No desktop
   phone frame, side gutters, or responsive desktop layout.
   ========================================================= */

@supports (height: 100dvh){
  #app{ height:100dvh; min-height:100dvh; }
}

/* =========================================================
   PROFILE EDITING
   ========================================================= */
.settings-profile__avatar img,
.avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.profile-identity{
  position:relative;
  padding-right:20px;
}
.profile-identity__info{
  min-width:0;
  flex:1;
}
.profile-edit-btn{
  width:38px;
  height:38px;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:var(--violet);
  background:var(--bg-elevated);
  border:1px solid var(--border-soft);
}
.profile-edit-btn svg{ width:18px; height:18px; }
.profile-edit-btn:active{ transform:scale(.94); }
.profile-edit-form{ padding:2px 0 4px; }
.profile-photo-editor{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 18px;
}
.profile-photo-editor__preview{
  width:72px;
  height:72px;
}
.profile-photo-btn{
  flex:none;
}
.sheet--profile{
  max-height:88vh;
}
.sheet--profile .field{ margin-bottom:14px; }
.sheet--profile .sheet__confirm-actions{ margin-top:8px; }
