/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== DESIGN TOKENS ===== */
:root {
  --orange:        #F58F20;
  --orange-light:  #FEF3E4;
  --orange-mid:    #FDDCAD;
  --orange-dark:   #D97A10;
  --green:         #467434;
  --green-light:   #EBF2E7;
  --green-dark:    #355828;
  --dark:          #363636;
  --dark2:         #4D4D4D;
  --dark3:         #6B6B6B;

  --bg:            #F5F2ED;
  --surface:       #FFFFFF;
  --surface2:      #FAF8F5;
  --border:        #E5DDD5;
  --border-light:  #EDE8E2;

  --text:          #363636;
  --text2:         #716B65;
  --text3:         #A49890;

  --shadow-xs:     0 1px 2px rgba(54,54,54,.06);
  --shadow-sm:     0 2px 6px rgba(54,54,54,.08), 0 1px 2px rgba(54,54,54,.04);
  --shadow:        0 4px 14px rgba(54,54,54,.09), 0 1px 4px rgba(54,54,54,.05);
  --shadow-md:     0 8px 28px rgba(54,54,54,.12), 0 2px 8px rgba(54,54,54,.06);
  --shadow-orange: 0 6px 22px rgba(245,143,32,.30), 0 2px 6px rgba(245,143,32,.18);
  --shadow-green:  0 6px 22px rgba(70,116,52,.28), 0 2px 6px rgba(70,116,52,.14);
  --shadow-dark:   0 6px 22px rgba(54,54,54,.28), 0 2px 6px rgba(54,54,54,.16);

  --radius-xl:     20px;
  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     6px;

  --nav-h:         72px;
  --header-h:      62px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* ===== BASE ===== */
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

/* ===== HEADER ===== */
.top-header {
  background: #FFFFFF;
  padding: 11px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  /* Orange gradient underline */
  border-bottom: none;
  box-shadow:
    0 1px 0 var(--border-light),
    0 4px 16px rgba(54,54,54,.05);
  position: relative;
}
.top-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, rgba(245,143,32,.3) 40%, transparent 70%);
}

/* Row 1: brand + date */
.header-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.header-logo-mark {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(245,143,32,.35);
}
.header-logo-mark svg { display: block; }
.header-brand {
  font-size: 10px;
  font-weight: 800;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .9px;
}
.header-date-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 11px;
  border-radius: 20px;
  letter-spacing: .1px;
}

/* Row 2: page title + add button */
.header-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1;
}
.header-add-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--orange);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(245,143,32,.40);
  transition: transform .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.header-add-btn:active {
  transform: scale(.90);
  box-shadow: 0 1px 4px rgba(245,143,32,.30);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  /* extra bottom space for floating nav: nav-height(64) + nav-bottom(12) + safe-area + breathing room(20) */
  padding-bottom: calc(64px + 12px + var(--safe-bottom) + 20px);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.main-content::-webkit-scrollbar { width: 0; }

/* ===== BOTTOM NAV — Floating Dark Pill ===== */
.bottom-nav {
  position: fixed;
  bottom: calc(10px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 452px;
  height: 64px;
  background: #231D11;
  border: 1px solid rgba(245,143,32,.22);
  border-radius: 22px;
  /* layered shadows for depth */
  box-shadow:
    0 10px 36px rgba(20,14,4,.45),
    0 3px 10px rgba(20,14,4,.25),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  z-index: 100;
  padding: 0 5px;
}

.nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.35);
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0;
}

.nav-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 13px;
  border-radius: 14px;
  transition: background .18s, transform .12s;
}
.nav-inner:active { transform: scale(.88); }

.nav-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15px;
  transition: color .18s;
}

/* Active state — orange pill */
.nav-item.active { color: #ffffff; }
.nav-item.active .nav-inner {
  background: var(--orange);
  box-shadow:
    0 3px 12px rgba(245,143,32,.55),
    0 1px 4px rgba(245,143,32,.35),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.nav-item svg { flex-shrink: 0; }

/* ===== HERO CARDS ===== */
.hero-card {
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.hero-card::before {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.hero-dark  { background: linear-gradient(135deg, #363636 0%, #4a4040 100%); box-shadow: var(--shadow-dark); }
.hero-orange{ background: linear-gradient(135deg, #F58F20 0%, #D97A10 100%); box-shadow: var(--shadow-orange); }
.hero-green { background: linear-gradient(135deg, #467434 0%, #2E5222 100%); box-shadow: var(--shadow-green); }
.hero-purple{ background: linear-gradient(135deg, #6B4FA0 0%, #4A3070 100%); box-shadow: 0 6px 22px rgba(107,79,160,.30); }

.hero-card * { position: relative; z-index: 1; }
.hero-label  { font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: .5px; text-transform: uppercase; color: #fff; margin-bottom: 6px; }
.hero-amount { font-size: 36px; font-weight: 900; letter-spacing: -1px; color: #fff; line-height: 1.1; }
.hero-sub    { font-size: 12px; opacity: .65; color: #fff; margin-top: 6px; font-weight: 500; }
.hero-row    { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
.hero-stat   { text-align: center; }
.hero-stat-v { font-size: 17px; font-weight: 800; color: #fff; }
.hero-stat-l { font-size: 10px; opacity: .65; color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  border: 1px solid var(--border-light);
}
.card-sm { padding: 13px 15px; }
.card-flush { padding: 0; overflow: hidden; }

/* ===== STAT GRID ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 5px;
}
.stat-value { font-size: 24px; font-weight: 900; letter-spacing: -.5px; color: var(--text); }
.stat-sub   { font-size: 11px; color: var(--text3); margin-top: 1px; font-weight: 500; }

/* ===== SECTION HEADER ===== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 6px;
}
.section-head h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .1px;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.btn:active { transform: scale(.96); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.btn-primary:active { background: var(--orange-dark); }

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-green);
}
.btn-green:active { background: var(--green-dark); }

.btn-dark {
  background: var(--dark);
  color: #fff;
  box-shadow: var(--shadow-dark);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-success { background: var(--green-light); color: var(--green); font-weight: 700; }
.btn-danger  { background: #FEF0ED; color: #D94040; font-weight: 700; }
.btn-full    { width: 100%; }
.btn-sm      { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-xs); }

.add-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.add-btn-row .btn-income {
  background: var(--green-light);
  color: var(--green);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.add-btn-row .btn-expense {
  background: #FEF0ED;
  color: #D94040;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-orange);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 90;
  transition: transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(.90); }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,143,32,.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A49890' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-textarea { resize: none; min-height: 88px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30,20,10,.45);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(110%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  z-index: 201;
  transition: transform .32s cubic-bezier(.32,0,.18,1);
  max-height: 92vh;
  overflow-y: auto;
  padding-bottom: calc(20px + var(--safe-bottom));
}
.modal.open { transform: translateX(-50%) translateY(0); }

.modal-handle {
  width: 38px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 14px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 0;
  position: sticky; top: 0;
  background: var(--surface);
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.modal-body { padding: 18px 18px 0; }

/* ===== TABS ===== */
.tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  gap: 2px;
}
.tab-btn {
  flex: 1; padding: 9px 4px;
  border: none; background: none;
  border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .1px;
}
.tab-btn.active {
  background: var(--surface);
  color: var(--orange);
  box-shadow: var(--shadow-xs);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1px;
}
.badge-orange  { background: var(--orange-light); color: var(--orange-dark); }
.badge-green   { background: var(--green-light); color: var(--green); }
.badge-red     { background: #FEF0ED; color: #D94040; }
.badge-blue    { background: #EEF4FF; color: #3461D1; }
.badge-gray    { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }

/* ===== LIST ITEMS ===== */
.list-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.list-item-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.1px; }
.list-item-sub   { font-size: 12px; color: var(--text2); margin-top: 1px; font-weight: 500; }
.list-item-right { text-align: right; flex-shrink: 0; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 7px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--orange), #FFB045);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.progress-fill.green { background: linear-gradient(90deg, var(--green), #6AAD52); }

/* ===== BOOK CARD ===== */
.book-card {
  display: flex; gap: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.book-spine { width: 5px; flex-shrink: 0; }
.book-content { display: flex; flex: 1; gap: 12px; padding: 13px 14px; min-width: 0; }
.book-info { flex: 1; min-width: 0; }
.book-title  { font-size: 15px; font-weight: 800; letter-spacing: -.1px; }
.book-author { font-size: 12px; color: var(--text2); margin-top: 2px; font-weight: 500; }
.book-meta   { font-size: 11px; color: var(--text3); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.book-actions{ display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }

/* ===== HABIT ITEM ===== */
.habit-item {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: background .2s;
}
.habit-item.done-item { background: var(--green-light); border-color: rgba(70,116,52,.2); }
.habit-check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
}
.habit-check.checked { background: var(--green); border-color: var(--green); }
.habit-check.checked svg { display: block; }
.habit-check svg { display: none; }
.habit-icon { font-size: 20px; }
.habit-name { flex: 1; font-size: 15px; font-weight: 600; }
.habit-name.checked { text-decoration: line-through; color: var(--text3); }
.habit-streak { font-size: 13px; color: var(--orange); font-weight: 800; }

/* ===== NOTE CARD ===== */
.note-card {
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 9px;
  border: 1px solid var(--border-light);
  cursor: pointer;
}
.note-title { font-size: 15px; font-weight: 800; margin-bottom: 5px; letter-spacing: -.1px; }
.note-body  { font-size: 13px; color: var(--text2); line-height: 1.55; }
.note-date  { font-size: 11px; color: var(--text3); margin-top: 8px; font-weight: 600; }

/* ===== MORE GRID ===== */
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; border: 1px solid var(--border-light);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s, box-shadow .12s;
}
.more-card:active { transform: scale(.96); box-shadow: var(--shadow-xs); }
.more-card-icon  { font-size: 30px; }
.more-card-title { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.1px; }
.more-card-sub   { font-size: 12px; color: var(--text2); font-weight: 500; }

/* ===== COLOR PICKER ===== */
.color-picker { display: flex; gap: 9px; flex-wrap: wrap; }
.color-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform .15s, border-color .15s;
  box-shadow: var(--shadow-xs);
}
.color-dot.selected, .color-dot:hover { border-color: var(--dark); transform: scale(1.12); }

/* ===== ITEM ACTION BUTTONS ===== */
.action-btns { display: flex; gap: 5px; margin-top: 5px; justify-content: flex-end; }
.action-edit {
  border: none;
  background: var(--orange-light);
  color: var(--orange-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex; align-items: center; gap: 3px;
}
.action-del {
  border: none;
  background: #FEF0ED;
  color: #D94040;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ===== TRANSACTION AMOUNTS ===== */
.tx-amount        { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.tx-amount.income  { color: var(--green); }
.tx-amount.expense { color: #D94040; }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--border-light); margin: 14px 0; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text2);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; font-weight: 500; color: var(--text3); }

/* ===== WEEKLY BAR CHART ===== */
.week-chart {
  display: flex; gap: 6px; align-items: flex-end; height: 56px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 10px;
}
.week-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; }
.week-bar-col  { flex: 1; width: 100%; background: var(--border-light); border-radius: 3px; display: flex; align-items: flex-end; overflow: hidden; }
.week-bar-fill { width: 100%; border-radius: 3px; transition: height .4s cubic-bezier(.4,0,.2,1); }
.week-bar-label{ font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase; }
.week-bar-label.today { color: var(--orange); }

/* ===== CAT BAR ===== */
.cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.cat-row-icon { font-size: 18px; }
.cat-row-body { flex: 1; min-width: 0; }
.cat-row-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cat-row-bar  { height: 5px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.cat-row-fill { height: 100%; border-radius: 3px; }
.cat-row-amt  { font-size: 13px; font-weight: 800; color: #D94040; flex-shrink: 0; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeUp .22s ease; }

/* ===== GOAL CARD ===== */
.goal-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 10px;
}
.goal-card.done { opacity: .55; }

/* ===== ICON HABIT BTN ===== */
.icon-habit-btn {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface2);
  font-size: 20px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.icon-habit-btn.selected {
  border-color: var(--orange);
  background: var(--orange-light);
  transform: scale(1.08);
}

/* ===== AUTHENTICATION ===== */
.auth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--bg);
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 20px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(245, 143, 32, 0.1);
  margin-bottom: 20px;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--font);
  margin-bottom: 12px;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,143,32,.12);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .1px;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
  font-family: var(--font);
  margin-top: 8px;
}

.auth-btn:active {
  transform: scale(.97);
  background: var(--orange-dark);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  color: #FF9090;
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
}

/* ===== UI TOAST ===== */
.ui-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.ui-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ui-toast.error {
  background: #D94040;
}
.ui-toast.success {
  background: var(--green);
}

