/* by-i - Warm Project System v2 (neutral base, light accents).
   Structure, header and dashboard layout unchanged. The original neutral
   palette is restored; colour appears only in data, small chips and one
   gradient. Test app only. */

:root{
  /* ---- original palette restored ---- */
  --ink:#111111;
  --ink-2:#444444;
  --muted:#8a8a86;
  --bg:#f6f5f3;
  --card:#ffffff;
  --line:#e6e4e0;
  --chip:#efedea;
  --green:#2e6b3f;
  --red:#a63d2e;
  --gray-amt:#6b6b67;
  --radius:14px;

  /* ---- the two light accents (used sparingly) ---- */
  --a1:#8fa07d;          /* sage  - positive / progress */
  --a1-soft:#eef2e8;
  --a2:#cf7f61;          /* clay  - attention / outgoing */
  --a2-soft:#faece5;
  --a3:#789eae;          /* quiet blue - transfers only */
  --a3-soft:#eaf1f4;

  --shadow-sm:0 1px 2px rgba(17,17,17,.04);
  --shadow-md:0 2px 10px rgba(17,17,17,.06);
}

body{ background:var(--bg); color:var(--ink); }

/* ---------- top bar ---------- */
.topbar{
  background:rgba(246,245,243,.93);
  backdrop-filter:saturate(1.05) blur(8px);
  -webkit-backdrop-filter:saturate(1.05) blur(8px);
  border-bottom:1px solid var(--line);
}
.topbar .r1 > img{ transition:opacity .15s ease; }
.topbar .r1 > img:active{ opacity:.6; }

/* ---------- cards ---------- */
.dash-card,.user-card,.tx-table,.bill,.bill3,.bill5{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}
.dash-card{ padding:14px; margin:12px 0; }
.dc-head{ font-weight:600; color:var(--ink); letter-spacing:-.01em; }
.dc-more{ color:var(--muted); font-weight:600; }
.dc-more:active{ color:var(--ink); }
.dc-row{ border-top:1px solid var(--line); }
.dc-val{ color:var(--ink); font-variant-numeric:tabular-nums; }

/* ---------- buttons (neutral, as before) ---------- */
.btn-main,.add-btn{
  background:var(--ink); color:#fff; border:1px solid var(--ink);
  border-radius:12px; box-shadow:var(--shadow-sm); min-height:46px; font-weight:600;
}
.btn-main:active,.add-btn:active{ background:#000; }
.btn-line{
  background:transparent; color:var(--ink); border:1px solid var(--line);
  border-radius:12px; min-height:46px; font-weight:600;
}
.btn-line:active{ background:var(--chip); }
.lang-btn{ background:var(--card); border:1px solid var(--line); color:var(--ink); border-radius:999px; min-height:38px; }

/* central plus - unchanged behaviour, neutral as before */
.fab{ background:var(--ink); color:#fff; box-shadow:0 6px 18px rgba(17,17,17,.26); border:none; }
.fab:active{ transform:translateY(1px) scale(.97); }

/* ---------- bottom navigation ---------- */
.tabbar{
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  padding-bottom:calc(6px + var(--safe-b));
}
.tico{ color:var(--muted); }
.tico.on,.tabbar .on{ color:var(--ink); font-weight:600; }

/* ---------- chips / status : light tints only ---------- */
.pill,.chip-cat,.me-chip,.badge{ border-radius:999px; border:1px solid var(--line); background:var(--chip); color:var(--ink); }
.pill.sel,.pill.on{ background:var(--ink); border-color:var(--ink); color:#fff; }
.st{ border-radius:999px; font-weight:600; padding:2px 10px; border:1px solid transparent; }
.st-open{ background:var(--a2-soft); color:#9a5238; border-color:#f0d7cb; }
.st-paid{ background:var(--a1-soft); color:#4a6238; border-color:#dde5d3; }
.st-rej{ background:var(--chip); color:#7a756e; border-color:var(--line); }

/* ---------- money semantics (original greens/reds kept) ---------- */
.in,.amt.in,.d-amount.in{ color:var(--green); }
.out,.amt.out,.d-amount.out{ color:var(--red); }
.transfer,.amt.transfer{ color:var(--a3); }
.amount-big{ font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.amt,.bal,.dc-val,.v,.ft-v,.xnums{ font-variant-numeric:tabular-nums; }

/* ---------- rows & lists ---------- */
.tx-row,.item-row,.set-row,.li{ border-bottom:1px solid var(--line); }
.tx-row:active,.item-row:active,.li:active{ background:#faf9f7; }
.day-head{ color:var(--muted); font-weight:600; }
.dim{ color:var(--muted); }

/* ---------- inputs ---------- */
input,select,textarea{
  background:var(--card); border:1px solid var(--line);
  border-radius:12px; color:var(--ink); min-height:44px;
}
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--a1);
  box-shadow:0 0 0 3px rgba(143,160,125,.16);   /* light accent on focus */
}
.filter-total{ background:var(--a1-soft); border:1px solid #dde5d3; border-radius:12px; color:#4a6238; }
.seg3 .on{ background:var(--ink); color:#fff; }

/* ---------- sheets & dialogs ---------- */
.sheet-back{ background:rgba(17,17,17,.40); backdrop-filter:blur(2px); }
.sheet,.sheet-wrap{
  background:var(--card);
  border-top-left-radius:22px; border-top-right-radius:22px;
  border:1px solid var(--line); box-shadow:0 -8px 30px rgba(17,17,17,.14);
  padding-bottom:calc(10px + var(--safe-b));
}
.grab{ background:var(--line); border-radius:999px; }

/* ---------- graphs : this is where colour lives ---------- */
.cbar{ border-radius:6px; }
.cbar.inv{ background:linear-gradient(180deg,#a9b899 0%,var(--a1) 100%); }
.cbar.rec{ background:linear-gradient(180deg,#e0a888 0%,var(--a2) 100%); }
.hbar{ background:var(--chip); border-radius:999px; overflow:hidden; }
.hbar-v{ background:linear-gradient(90deg,var(--a1) 0%,#b6c3a6 100%); border-radius:999px; }
.clabel{ color:var(--muted); }
.dot{ background:var(--a1); }
.balbar{ background:var(--chip); }

/* ---------- empty states ---------- */
.empty{
  color:var(--muted); background:var(--card);
  border:1px dashed var(--line); border-radius:var(--radius);
  padding:22px 16px; text-align:center;
}

/* ---------- login ---------- */
#login{ background:var(--bg); }
#login .slogan,#login .byline{ color:var(--muted); letter-spacing:.16em; }
.pin-err{ color:var(--red); font-weight:600; }
.pin-err.is-lockout{
  color:#9a5238; background:var(--a2-soft); border:1px solid #f0d7cb;
  border-radius:12px; padding:8px 12px; font-weight:600;
}

/* ---------- dashboard header + hero ---------- */
.warm-hello{ padding:16px 2px 2px; }
.warm-hello .wh-sub{ color:var(--muted); font-size:13px; font-weight:600; }
.warm-hello .wh-title{
  color:var(--ink); font-size:23px; line-height:1.32; font-weight:700;
  letter-spacing:-.02em; margin-top:4px;
}

/* neutral dark hero with one soft gradient + a thin accent line */
.hero{
  position:relative; overflow:hidden;
  background:linear-gradient(150deg,#2a2a28 0%,#181817 55%,#111111 100%);
  color:#fbfaf8; border-radius:18px; padding:18px 16px; margin:12px 0 4px;
  box-shadow:0 6px 20px rgba(17,17,17,.18);
}
.hero::before{
  content:''; position:absolute; inset:0 0 auto 0; height:3px;
  background:linear-gradient(90deg,var(--a1) 0%,#c9b98f 50%,var(--a2) 100%);
  opacity:.9;
}
.hero::after{   /* very soft warm glow, keeps it from feeling flat */
  content:''; position:absolute; width:190px; height:190px; border-radius:50%;
  right:-70px; top:-90px;
  background:radial-gradient(circle,rgba(207,127,97,.20) 0%,rgba(207,127,97,0) 70%);
  pointer-events:none;
}
.hero .h-label{ font-size:12.5px; opacity:.72; font-weight:600; letter-spacing:.02em; }
.hero .h-amount{
  font-size:31px; font-weight:700; letter-spacing:-.02em; margin-top:6px;
  font-variant-numeric:tabular-nums;
  background:linear-gradient(90deg,#ffffff 0%,#f0ece2 60%,#e8ded0 100%);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:#fff;
}
.hero .h-cur{
  font-size:14px; opacity:.62; font-weight:600; margin-inline-start:6px;
  -webkit-text-fill-color:rgba(251,250,248,.72);
}
.hero .h-note{ font-size:12px; opacity:.60; margin-top:8px; }
.hero-acts{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; position:relative; }
.hero-acts button{
  background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.16);
  color:#fbfaf8; border-radius:12px; min-height:46px; font-weight:600;
  font-size:13px; display:flex; align-items:center; justify-content:center; gap:5px;
  font-family:inherit; cursor:pointer; transition:background .15s ease;
}
.hero-acts button:hover{ background:rgba(255,255,255,.16); }
.hero-acts button:active{ background:rgba(255,255,255,.22); }
.hero-acts .ha-in{ box-shadow:inset 0 -2px 0 var(--a1); }
.hero-acts .ha-out{ box-shadow:inset 0 -2px 0 var(--a2); }
.hero-acts .ha-tr{ box-shadow:inset 0 -2px 0 rgba(255,255,255,.30); }

/* attention block (only rendered when real records back it) */
.attn{ background:var(--a2-soft); border:1px solid #f0d7cb; border-radius:var(--radius); padding:12px 14px; margin:12px 0; }
.attn .a-h{ color:#9a5238; font-weight:700; font-size:13px; margin-bottom:6px; }
.attn .a-row{ color:#7d5140; font-size:13px; padding:3px 0; }

/* ---------- responsive / safety ---------- */
html,body{ max-width:100%; overflow-x:hidden; }
.view{ padding-bottom:calc(96px + var(--safe-b)); }
@media (max-width:360px){
  .warm-hello .wh-title{ font-size:21px; }
  .hero .h-amount{ font-size:28px; }
  .hero-acts button{ font-size:12px; min-height:44px; }
}
@media (min-width:768px){
  #app,.view{ max-width:720px; margin-inline:auto; }
  .hero{ padding:22px 20px; }
  .hero .h-amount{ font-size:34px; }
}
@media (min-width:1024px){ #app,.view{ max-width:860px; } }