/* =====================================================================
   Lumixo — styles.css
   ===================================================================== */
:root {
  --bg: #0b0b0f; --bg-2: #101017; --panel: #14141d; --panel-2: #191924;
  --cell: #1c1c28; --cell-hover: #23232f;
  --border: #24242f; --border-strong: #33333f;
  --text: #f2f2f6; --muted: #9a9aa6; --faint: #63636e;
  --accent: #7c6cff; --accent-2: #9d84ff; --accent-soft: rgba(124,108,255,.16);
  --green: #34d399; --amber: #fbbf24; --orange: #ff9f45; --pink: #ff5c8a; --blue: #60a5fa;
  --radius: 20px; --radius-sm: 13px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
  --ease: cubic-bezier(.22,1,.36,1);
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}
[data-theme="light"] {
  --bg: #f4f4f8; --bg-2: #ececf3; --panel: #ffffff; --panel-2: #f7f7fb;
  --cell: #f1f1f6; --cell-hover: #e9e9f1;
  --border: #e6e6ee; --border-strong: #d7d7e2;
  --text: #16161c; --muted: #6a6a76; --faint: #9a9aa6;
  --accent-soft: rgba(124,108,255,.13);
  --shadow: 0 10px 34px rgba(30,25,70,.10);
  --shadow-lg: 0 24px 60px rgba(30,25,70,.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overflow: hidden;
  background-image: radial-gradient(900px 500px at 78% -8%, rgba(124,108,255,.14), transparent 60%);
}
.hidden { display: none !important; }
svg { width: 100%; height: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 20px; }

/* ---------------- Boot loader ---------------- */
#bootLoader { display: none; position: fixed; inset: 0; place-items: center; z-index: 200; background: var(--bg); }
body.booting #bootLoader { display: grid; }
body.booting #authScreen, body.booting #app { display: none !important; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Auth screen ---------------- */
.auth-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 100; overflow: auto;
  background: radial-gradient(1100px 600px at 50% -10%, rgba(124,108,255,.20), transparent 60%), var(--bg); }
.auth-lang { position: absolute; top: 22px; right: 24px; }
.auth-glow { position: absolute; bottom: -160px; left: 50%; transform: translateX(-50%); width: 620px; height: 320px;
  background: radial-gradient(circle, rgba(124,108,255,.30), transparent 65%); filter: blur(40px); pointer-events: none; }
.auth-card { position: relative; z-index: 2; width: 100%; max-width: 400px; background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: 26px; padding: 40px 34px; box-shadow: var(--shadow-lg); text-align: center;
  animation: authIn .6s var(--ease); }
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.logo-orb { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(140deg, var(--accent-2), var(--accent) 55%, #5b4bff);
  box-shadow: 0 6px 20px rgba(124,108,255,.5); position: relative; flex: none; }
.logo-orb::after { content: ""; position: absolute; inset: 7px 7px auto auto; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.9); }
.logo-orb.big { width: 60px; height: 60px; border-radius: 18px; }
.logo-orb.big::after { inset: 14px 14px auto auto; width: 15px; height: 15px; }
.auth-card h1 { font-size: 25px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-tagline { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.auth-config { background: var(--accent-soft); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 14px;
  margin-bottom: 20px; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.auth-config strong { font-size: 13.5px; color: var(--accent-2); }
.auth-config span { font-size: 12.5px; color: var(--muted); }
.oauth-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 11px; height: 50px;
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: 14px; color: var(--text);
  font-size: 15px; font-weight: 600; margin-bottom: 11px; transition: transform .15s var(--ease), background .2s, border-color .2s; }
.oauth-btn:hover { background: var(--cell-hover); transform: translateY(-1px); }
.oauth-btn:active { transform: translateY(0); }
.oauth-btn:disabled { opacity: .55; pointer-events: none; }
.oauth-ic { width: 20px; height: 20px; flex: none; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-field { margin-bottom: 11px; }
.auth-field input { width: 100%; height: 50px; padding: 0 15px; background: var(--cell); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text); font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-error { color: var(--pink); font-size: 13px; min-height: 0; max-height: 0; overflow: hidden; transition: max-height .3s, margin .3s; text-align: left; }
.auth-error.show { max-height: 60px; margin: 2px 0 10px; }
.auth-submit { height: 50px; margin-top: 4px; font-size: 15.5px; }
.auth-toggle { margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.auth-toggle button { color: var(--accent-2); font-weight: 700; font-size: 13.5px; }
.auth-toggle button:hover { text-decoration: underline; }

/* ---------------- App shell ---------------- */
.app { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 20px; }
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px; }
.logo-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; color: var(--muted);
  font-size: 14.5px; font-weight: 500; transition: background .18s, color .18s; text-align: left; }
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--cell); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.side-card { margin-top: auto; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 17px; overflow: hidden; }
.sc-label { color: var(--muted); font-size: 12px; }
.sc-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 6px; }
.sc-delta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.spark { height: 48px; margin-top: 8px; }
.user { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 14px; transition: background .18s; }
.user:hover { background: var(--cell); }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--cell); display: grid; place-items: center; color: var(--muted); flex: none; }
.avatar svg { width: 21px; height: 21px; }
.user-info { flex: 1; text-align: left; overflow: hidden; }
.user-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pro { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent-2); background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; }

.main { overflow: hidden; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; border-bottom: 1px solid var(--border); }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; min-width: 190px; text-transform: capitalize; }
.round-btn { width: 38px; height: 38px; border-radius: 11px; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  font-size: 19px; display: grid; place-items: center; transition: background .18s, transform .1s; }
.round-btn:hover { background: var(--cell-hover); }
.round-btn:active { transform: scale(.94); }
.round-btn.ghost { background: transparent; }
.round-btn svg { width: 18px; height: 18px; }
.today-pill { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-size: 20px; display: grid; place-items: center; margin-left: 4px; }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); border: 2px solid var(--bg); }
.top-actions { display: flex; align-items: center; gap: 10px; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; height: 42px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(124,108,255,.36); transition: transform .13s var(--ease), box-shadow .2s; white-space: nowrap; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(124,108,255,.46); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; pointer-events: none; }
.btn-primary.block { width: 100%; }
.btn-ghost { padding: 0 17px; height: 42px; border-radius: 12px; background: var(--cell); color: var(--muted); font-size: 14px; font-weight: 600; transition: background .18s; }
.btn-ghost:hover { background: var(--cell-hover); color: var(--text); }
.plus { font-size: 18px; line-height: 1; margin-top: -1px; }

.views { flex: 1; overflow-y: auto; padding: 24px 26px 40px; }
.view { animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.view-head { margin-bottom: 20px; }
.view-head h2 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.view-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }

/* ---------------- Cards ---------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s; }
.stat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.delta { font-weight: 700; font-size: 12px; }
.delta.up { color: var(--pink); } .delta.down { color: var(--green); }

/* ---------------- Workspace ---------------- */
.workspace { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.ws-left, .ws-right { display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.panel-head h3 { font-size: 15px; font-weight: 600; }
.calendar-panel { padding: 16px; }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.weekday { text-align: center; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { position: relative; aspect-ratio: 1; background: var(--cell); border: 1px solid transparent; border-radius: 13px; padding: 8px;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; overflow: hidden; transition: transform .13s var(--ease), background .18s, border-color .18s; }
.day:hover:not(.other) { background: var(--cell-hover); transform: translateY(-2px); }
.day.other { background: transparent; pointer-events: none; opacity: .32; }
.day-num { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.day.is-today .day-num { color: var(--accent-2); }
.day.is-today { border-color: var(--accent); }
.day.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 22px var(--sel-glow, transparent); background: var(--cell-hover); }
.day-spend { margin-top: auto; font-size: 11.5px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.spend-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; box-shadow: 0 0 7px currentColor; }
.intensity { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; opacity: .85; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.leg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.leg .dot { width: 9px; height: 9px; border-radius: 50%; }
.leg .ring { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
.leg small { color: var(--faint); }

.chart-panel { padding-bottom: 12px; }
.chart-wrap { position: relative; height: 210px; padding: 10px 8px 0; }
.chart-tip { position: absolute; transform: translate(-50%, -140%); background: var(--panel-2); border: 1px solid var(--border-strong);
  padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; pointer-events: none; opacity: 0; transition: opacity .15s; white-space: nowrap; box-shadow: var(--shadow); z-index: 3; }
.chart-tip small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; text-transform: capitalize; }

/* ---------------- Day panel ---------------- */
.day-panel { padding: 20px; min-height: 300px; }
.dp-empty { color: var(--faint); font-size: 13.5px; text-align: center; padding: 60px 20px; }
.dp-head { margin-bottom: 14px; }
.dp-date { font-size: 15px; font-weight: 700; text-transform: capitalize; }
.dp-total-label { font-size: 12px; color: var(--muted); }
.dp-total { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 14px; }
.dp-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.exp { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 13px; background: var(--cell); transition: background .16s; }
.exp:hover { background: var(--cell-hover); }
.exp-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.exp-ic svg { width: 18px; height: 18px; }
.exp-mid { flex: 1; min-width: 0; }
.exp-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.badge-auto { font-size: 9px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); padding: 2px 5px; border-radius: 5px; letter-spacing: .03em; }
.exp-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.tag { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.exp-right { text-align: right; }
.exp-amt { font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.exp-tools { display: flex; gap: 4px; margin-top: 3px; opacity: 0; transition: opacity .16s; }
.exp:hover .exp-tools { opacity: 1; }
.tool { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); background: var(--panel); }
.tool svg { width: 13px; height: 13px; }
.tool:hover { color: var(--text); } .tool.del:hover { color: var(--pink); }
.dp-foot { margin-top: 4px; }

/* ---------------- Form ---------------- */
.dp-form-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.back-btn { width: 32px; height: 32px; border-radius: 9px; background: var(--cell); display: grid; place-items: center; color: var(--muted); }
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { background: var(--cell-hover); color: var(--text); }
.field { margin-bottom: 14px; flex: 1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input, .select { width: 100%; height: 44px; padding: 0 13px; background: var(--cell); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-size: 14px; transition: border-color .18s, box-shadow .18s; }
.field input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select { cursor: pointer; appearance: none; 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='%239a9aa6' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.field-row { display: flex; gap: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-opt { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px; background: var(--cell);
  border: 1px solid transparent; font-size: 10px; font-weight: 600; color: var(--muted); transition: all .16s; }
.cat-opt .ci { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.cat-opt .ci svg { width: 16px; height: 16px; }
.cat-opt:hover { background: var(--cell-hover); }
.cat-opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------------- Donut ---------------- */
.donut-panel { padding-bottom: 20px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 16px 20px 0; }
.donut-svg { width: 118px; height: 118px; flex: none; transform: rotate(-90deg); }
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.dl-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.dl-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dl-name { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-pct { font-weight: 700; }

/* ---------------- Lists / rows ---------------- */
.list-panel { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; transition: background .16s; }
.row-item:hover { background: var(--cell); }
.ri-date { font-size: 12px; color: var(--muted); width: 58px; text-align: right; }
.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--cell); flex: none; }
.icon-btn-sm svg { width: 15px; height: 15px; }
.icon-btn-sm:hover { background: var(--cell-hover); color: var(--text); }
.icon-btn-sm.del:hover { color: var(--pink); }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 0 15px; height: 48px; margin-bottom: 16px; }
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 14.5px; height: 100%; }
.mini-btn { padding: 8px 15px; border-radius: 10px; background: var(--cell); color: var(--text); font-size: 13px; font-weight: 600; transition: background .16s; display: inline-flex; align-items: center; gap: 6px; }
.mini-btn svg { width: 15px; height: 15px; }
.mini-btn:hover { background: var(--cell-hover); }
.mini-btn.danger { color: var(--pink); } .mini-btn.danger:hover { background: rgba(255,92,138,.14); }

/* ---------------- Recurring ---------------- */
.rec-item { display: flex; align-items: center; gap: 14px; padding: 13px; border-radius: 14px; transition: background .16s; }
.rec-item:hover { background: var(--cell); } .rec-item.off { opacity: .5; }
.rec-day { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.rec-day b { font-size: 17px; font-weight: 700; color: var(--accent-2); line-height: 1; }
.rec-day span { font-size: 9px; color: var(--muted); text-transform: uppercase; }
.rec-main { flex: 1; } .rec-name { font-size: 14.5px; font-weight: 600; } .rec-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--cell-hover); border-radius: 20px; transition: background .2s; }
.switch .track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .22s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(18px); }

/* ---------------- Goals / reports ---------------- */
.goal-ring-wrap { padding: 30px; display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.goal-ring { width: 168px; height: 168px; flex: none; }
.goal-info { flex: 1; min-width: 240px; }
.goal-info h3 { font-size: 15px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.goal-big { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0; }
.goal-sub { font-size: 13.5px; color: var(--muted); }
.bar-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.bar-name { width: 140px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.bar-track { flex: 1; height: 9px; background: var(--cell); border-radius: 10px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 10px; transition: width .6s var(--ease); }
.bar-val { width: 90px; text-align: right; font-size: 13.5px; font-weight: 700; }

/* ---------------- Settings ---------------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-title { font-size: 14.5px; font-weight: 600; }
.setting-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.segmented { display: inline-flex; background: var(--cell); border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button { padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all .16s; }
.segmented button.active { background: var(--panel); color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.2); }

/* ---------------- Sheet ---------------- */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 60; animation: fade .25s; }
.sheet { background: var(--panel); border: 1px solid var(--border); border-radius: 24px 24px 0 0; width: 100%; max-width: 440px; padding: 8px 22px 26px; box-shadow: var(--shadow-lg); animation: sheetUp .35s var(--ease); }
@media (min-width: 560px) { .sheet-overlay { align-items: center; } .sheet { border-radius: 24px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 18px; }
.sheet-head h3 { font-size: 17px; font-weight: 700; }
.sheet-foot { margin-top: 8px; }

/* ---------------- Toast ---------------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--border-strong);
  color: var(--text); padding: 12px 20px; border-radius: 13px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 120; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; flex-direction: row; align-items: center; z-index: 40;
    padding: 8px; gap: 4px; border-right: none; border-top: 1px solid var(--border); overflow-x: auto; }
  .logo, .side-card, .user-info, .pro { display: none; }
  .user { padding: 6px; }
  .nav { flex-direction: row; gap: 2px; }
  .nav-item span { display: none; }
  .nav-item { padding: 11px; }
  .main { padding-bottom: 66px; }
  .topbar { padding: 14px 16px; }
  .month-nav h1 { font-size: 18px; min-width: auto; }
  .views { padding: 16px; }
  #newExpenseTxt { display: none; }
}
