/* Hamyon — premium minimal dizayn. Telefon: pastki menyu; kompyuter (>=860px): yon menyu + panjara. */
:root {
  --bg: #f2f3f8; --card: #ffffff; --card2: #f7f8fb; --text: #0f1222; --hint: #8a90a2;
  --line: rgba(15, 18, 34, .07); --line2: rgba(15, 18, 34, .14); --soft: rgba(15, 18, 34, .045);
  --accent: #4f46e5; --accent2: #7c3aed; --accent-text: #fff; --accent-soft: rgba(79, 70, 229, .10);
  --green: #12a35c; --red: #e5413a; --amber: #e88a00;
  --h1: #4338ca; --h2: #7c3aed; --h3: #c026d3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -12px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .35);
  --r: 20px; --tabbar: 68px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #090b11; --card: #13161f; --card2: #1a1e2a; --text: #f2f4f8; --hint: #8a92a8;
  --line: rgba(255, 255, 255, .06); --line2: rgba(255, 255, 255, .13); --soft: rgba(255, 255, 255, .05);
  --accent: #8b8cff; --accent2: #b18cff; --accent-text: #0b0d14; --accent-soft: rgba(139, 140, 255, .14);
  --green: #3ddc8b; --red: #ff6b61; --amber: #ffb547;
  --h1: #312e81; --h2: #5b21b6; --h3: #86198f;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .035), 0 12px 32px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; transition: transform .12s ease, background-color .15s ease, opacity .15s; }
button:active { transform: scale(.975); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#app { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 18px); }
.muted { color: var(--hint); } .small { font-size: 13px; } .pos { color: var(--green); } .neg { color: var(--red); }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loading, .empty { padding: 44px 16px; text-align: center; color: var(--hint); }
.skel { height: 120px; border-radius: var(--r); margin: 12px; background: linear-gradient(90deg, var(--soft) 25%, var(--line) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- sarlavha (telefon) ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 2px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.logo { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--h1), var(--h2) 60%, var(--h3)); box-shadow: 0 6px 16px -6px var(--h2); }
.logo svg { width: 17px; height: 17px; stroke-width: 2.2; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--hint); background: var(--card); box-shadow: var(--shadow); }
.ptitle { display: none; }

/* ---------- pastki menyu (telefon) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 2px;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--line); padding: 6px 8px env(safe-area-inset-bottom);
}
.tabbar button { flex: 1; max-width: 120px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--hint); font-size: 11px; font-weight: 600; border-radius: 14px; }
.tabbar button svg { width: 22px; height: 22px; transition: transform .2s; }
.tabbar button.active { color: var(--accent); }
.tabbar button.active svg { transform: translateY(-1px); }
.tabbar button { position: relative; }
.tabbar button.active::after { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--accent); position: absolute; bottom: 3px; }
.side { display: none; }
.tab { display: none; animation: fade .22s ease; }
.tab.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- kartalar ---------- */
.card { background: var(--card); border-radius: var(--r); margin: 12px 12px 0; padding: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 4px 0; overflow: hidden; }
.sec-title { margin: 22px 16px 0; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.sec-title button { color: var(--accent); font-size: 14px; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.sec-title button:hover { background: var(--accent-soft); }
.sec-title .sum { font-weight: 700; color: var(--hint); font-size: 14px; }
.hint-line { margin-top: 10px; font-size: 12.5px; color: var(--hint); }

/* ---------- hero (umumiy balans) ---------- */
.hero { position: relative; overflow: hidden; margin: 12px 12px 0; border-radius: 24px; padding: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .22) 0%, transparent 42%),
              linear-gradient(135deg, var(--h1) 0%, var(--h2) 62%, var(--h3) 130%);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--h2) 80%, transparent); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.hero::before { width: 240px; height: 240px; right: -70px; bottom: -110px; }
.hero::after { width: 120px; height: 120px; right: 60px; top: -60px; }
.hero .lbl { font-size: 13px; opacity: .78; font-weight: 500; }
.hero .amount { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.15; margin-top: 2px; }
.hero .amount small { font-size: 16px; font-weight: 600; opacity: .8; letter-spacing: 0; }
.hero .stats { display: flex; gap: 8px; margin-top: 6px; position: relative; z-index: 1; }
.hero .scap { font-size: 11.5px; opacity: .7; margin-top: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; position: relative; z-index: 1; }
.hero .stat { flex: 1; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 9px 11px; min-width: 0; }
.hero .stat span { display: block; font-size: 11.5px; opacity: .8; }
.hero .stat b { font-size: 15px; letter-spacing: -.2px; white-space: nowrap; }

/* ---------- limit halqasi ---------- */
.limit { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring .track { stroke: var(--soft); }
.ring .bar { transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring .center b { font-size: 18px; letter-spacing: -.4px; }
.ring .center span { font-size: 11px; color: var(--hint); }
.limit .info { flex: 1; min-width: 0; }
.limit .cap { font-size: 12px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .5px; }
.limit .big { font-size: clamp(20px, 6.2vw, 26px); font-weight: 800; letter-spacing: -.8px; line-height: 1.2; margin-top: 2px; white-space: nowrap; }
.limit .sub { color: var(--hint); font-size: 13px; margin-top: 3px; }
.limit .sub button { color: var(--accent); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-top: 10px; background: var(--soft); }
.pill.good { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.pill.bad { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
.pill.warn { background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber); }

/* ---------- tezkor kiritish ---------- */
.quick { display: flex; gap: 8px; align-items: center; }
.quick input { flex: 1; min-width: 0; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--card2); padding: 0 16px; outline: none; font-size: 15.5px; transition: border-color .15s, box-shadow .15s; }
.quick input:focus { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-round { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--h1), var(--h2)); box-shadow: 0 8px 18px -8px var(--h2); }
:root[data-theme="dark"] .btn-round { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.btn-round.ghost, :root[data-theme="dark"] .btn-round.ghost { background: var(--card2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn-round[disabled] { opacity: .5; }
.qres { margin-top: 10px; font-size: 13px; color: var(--hint); line-height: 1.5; }

/* ---------- hisob kartalari (bank kartasi ko'rinishi) ---------- */
.accs { display: flex; gap: 12px; overflow-x: auto; padding: 12px 12px 6px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.accs::-webkit-scrollbar { display: none; }
.acc { flex: none; width: 172px; height: 108px; border-radius: 18px; padding: 14px 15px; color: #fff; text-align: left; position: relative; overflow: hidden;
  scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 12px 26px -14px var(--g1); }
.acc::before { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -42px; top: -48px; background: rgba(255, 255, 255, .14); }
.acc::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: 30px; bottom: -60px; background: rgba(0, 0, 0, .08); }
.acc .top2 { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.acc .n { font-size: 13.5px; font-weight: 700; letter-spacing: .1px; }
.acc .e { font-size: 17px; }
.acc .b { font-size: 17.5px; font-weight: 800; letter-spacing: -.4px; position: relative; z-index: 1; }
.acc .c { font-size: 11px; opacity: .75; position: relative; z-index: 1; }
.acc.add { width: 76px; background: var(--card); color: var(--accent); box-shadow: var(--shadow); align-items: center; justify-content: center; font-size: 26px; font-weight: 300; }
.acc.add::before, .acc.add::after { display: none; }

/* ---------- uchtalik ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trio div { background: var(--card2); border-radius: 14px; padding: 11px 12px; min-width: 0; }
.trio span { display: block; font-size: 12px; color: var(--hint); }
.trio b { font-size: 16px; letter-spacing: -.3px; white-space: nowrap; }

/* ---------- yozuvlar ---------- */
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 16px; width: 100%; text-align: left; border-radius: 0; }
.tx:hover { background: var(--soft); }
.tx:active { transform: none; background: var(--soft); }
.av { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; flex: none;
  background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent); }
.tx .t1 { font-weight: 600; letter-spacing: -.1px; }
.tx .t2 { color: var(--hint); font-size: 12.5px; margin-top: 1px; }
.tx .amt { font-weight: 700; white-space: nowrap; text-align: right; letter-spacing: -.2px; }
.tx .amt small { display: block; font-weight: 500; color: var(--hint); font-size: 11.5px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.day-h { display: flex; justify-content: space-between; padding: 16px 18px 6px; font-size: 13px; color: var(--hint); font-weight: 700; }
.reveal > * { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.reveal > *:nth-child(2) { animation-delay: .03s; } .reveal > *:nth-child(3) { animation-delay: .06s; }
.reveal > *:nth-child(4) { animation-delay: .09s; } .reveal > *:nth-child(5) { animation-delay: .12s; }
.reveal > *:nth-child(n+6) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- filtrlar ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 12px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--card); font-size: 13.5px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); color: var(--hint); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); box-shadow: none; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 0; }
.filters select, .filters input { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 0 12px; outline: none; width: 100%; min-width: 0; }
.filters .search { grid-column: 1 / -1; }
.sumbar { display: flex; justify-content: space-between; padding: 14px 18px 0; font-size: 13px; color: var(--hint); }

/* ---------- grafiklar ---------- */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 140px; height: 140px; flex: none; position: relative; }
.donut svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .center b { font-size: 16px; letter-spacing: -.3px; }
.donut .center span { font-size: 11px; color: var(--hint); }
.legend { flex: 1; min-width: 0; display: grid; gap: 7px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cat-row { display: block; width: 100%; text-align: left; padding: 11px 0; border-top: 1px solid var(--line); }
.cat-row:first-child { border-top: 0; }
.cat-row .top2 { display: flex; justify-content: space-between; gap: 8px; }
.meter { height: 7px; border-radius: 4px; background: var(--soft); margin-top: 7px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.bars svg { width: 100%; height: 160px; display: block; }
.legend-line { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--hint); margin-top: 8px; }
.legend-line i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- loyihalar ---------- */
.prj { display: block; width: auto; text-align: left; }
.card.prj:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line2); }
.prj .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prj .name { font-weight: 800; font-size: 16.5px; letter-spacing: -.3px; }
.prj .profit { font-weight: 800; font-size: 24px; margin-top: 10px; letter-spacing: -.7px; }
.prj .meta { color: var(--hint); font-size: 12.5px; margin-top: 2px; }
.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; background: var(--soft); gap: 2px; }
.split i { display: block; height: 100%; border-radius: 4px; }
.status { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--hint); font-weight: 700; }
.status.on { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }

/* ---------- AI chat ---------- */
.ai-head { display: flex; gap: 14px; align-items: center; }
.ai-head .av { background: linear-gradient(135deg, var(--h1), var(--h2)); color: #fff; }
.chat { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; animation: rise .3s ease both; }
.msg.user { align-self: flex-end; color: #fff; background: linear-gradient(135deg, var(--h1), var(--h2)); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--card); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.typing { color: var(--hint); }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 12px 4px; }
.sugg button { background: var(--card); padding: 9px 13px; border-radius: 14px; font-size: 13.5px; font-weight: 500; text-align: left; box-shadow: var(--shadow); }
.sugg button:hover { color: var(--accent); }
.ai-input { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 12px; background: linear-gradient(transparent, var(--bg) 35%); }
.ai-input .quick input { background: var(--card); box-shadow: var(--shadow); }

/* ---------- sozlamalar ro'yxati ---------- */
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; border-top: 1px solid var(--line); min-height: 52px; }
.list-item:first-child { border-top: 0; }
button.list-item:hover, label.list-item:hover { background: var(--soft); }
button.list-item:active { transform: none; }
.list-item .v { color: var(--hint); white-space: nowrap; }
.list-item select, .list-item input[type=time] { border: 1px solid var(--line); background: var(--card2); color: var(--text); border-radius: 10px; padding: 6px 10px; max-width: 55%; }
.switch { position: relative; width: 48px; height: 29px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 999px; transition: .22s; }
.switch span::after { content: ""; position: absolute; width: 23px; height: 23px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .22s cubic-bezier(.3, .7, .3, 1.2); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(19px); }

/* ---------- oyna (telefonda pastdan, kompyuterda markazda) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet.hidden { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(6, 8, 14, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadebg .2s ease; }
@keyframes fadebg { from { opacity: 0; } }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 6px 0 calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg);
  animation: up .32s cubic-bezier(.2, .9, .2, 1); }
@keyframes up { from { transform: translateY(40%); opacity: .3; } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 6px auto 8px; }
.sheet h2 { margin: 8px 16px 4px; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.sheet .x { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--card); color: var(--hint); display: none; place-items: center; box-shadow: var(--shadow); }

/* ---------- forma ---------- */
.seg { display: flex; background: var(--soft); border-radius: 14px; padding: 4px; gap: 3px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--hint); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.form { padding: 0 12px; }
.field { background: var(--card); border-radius: 16px; padding: 9px 15px; margin-top: 10px; box-shadow: var(--shadow); border: 1px solid transparent; transition: border-color .15s; }
.field:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.field label { display: block; font-size: 12px; color: var(--hint); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 0; background: none; outline: none; padding: 4px 0; font-size: 16px; }
.field select option { background: var(--card); color: var(--text); }
.field.amount input { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .field { margin-top: 10px; }
.btn { display: block; width: 100%; height: 54px; border-radius: 16px; color: #fff; font-weight: 700; font-size: 16px; margin-top: 16px; letter-spacing: -.1px;
  background: linear-gradient(135deg, var(--h1), var(--h2)); box-shadow: 0 12px 24px -12px var(--h2); }
:root[data-theme="dark"] .btn { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.btn.danger { background: transparent; color: var(--red); box-shadow: none; margin-top: 6px; }
.btn[disabled] { opacity: .55; }
.items { margin-top: 12px; font-size: 13px; color: var(--hint); background: var(--card); border-radius: 14px; padding: 12px 14px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: rgba(15, 18, 30, .94); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; max-width: calc(100% - 32px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: rise .25s ease; }
.toast.hidden { display: none; }

/* ======================= KOMPYUTER ======================= */
@media (min-width: 860px) {
  body { font-size: 15px; }
  #app { max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .top, .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: var(--card); border-right: 1px solid var(--line); }
  .side .brand { padding: 4px 10px 22px; }
  .side button { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px; color: var(--hint); font-weight: 600; font-size: 14.5px; text-align: left; }
  .side button:hover { background: var(--soft); color: var(--text); }
  .side button.active { background: var(--accent-soft); color: var(--accent); }
  .side .spacer { flex: 1; }
  .side .foot { font-size: 12px; color: var(--hint); padding: 10px 13px 0; line-height: 1.5; }
  main { padding: 26px 34px 48px; max-width: 1180px; width: 100%; }
  .ptitle { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 18px; }
  .ptitle h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.8px; }
  .ptitle span { color: var(--hint); font-size: 14px; }
  .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .s12 { grid-column: span 12; } .s8 { grid-column: span 8; } .s7 { grid-column: span 7; } .s6 { grid-column: span 6; }
  .s5 { grid-column: span 5; } .s4 { grid-column: span 4; }
  .card, .hero { margin: 0; }
  .card { padding: 20px; }
  .card.flush { padding: 6px 0; }
  .hero { padding: 24px; min-height: 196px; display: flex; flex-direction: column; justify-content: space-between; }
  .hero .amount { font-size: 40px; }
  .sec-title { margin: 0 2px 10px; }
  .accs { padding: 0 0 6px; flex-wrap: wrap; overflow: visible; }
  .acc { width: calc((100% - 48px) / 5); min-width: 168px; height: 116px; }
  .acc:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -16px var(--g1); }
  .acc.add { min-width: 76px; width: 76px; }
  .acc.add:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line2); }
  .chips, .filters { padding-left: 0; padding-right: 0; }
  .chips { padding-top: 0; }
  #statsBody { margin-top: 16px; }
  .filters { grid-template-columns: repeat(4, 1fr) 1.4fr; }
  .filters .search { grid-column: auto; }
  .sumbar { padding: 14px 4px 0; }
  .day-h { padding: 18px 6px 8px; }
  .chat { padding: 0; max-width: 780px; margin: 0 auto; }
  .sugg { padding: 16px 0 4px; max-width: 780px; margin: 0 auto; }
  .ai-input { bottom: 0; padding: 14px 0 20px; max-width: 780px; margin: 0 auto; }
  .tx { padding: 12px 18px; }
  .sheet-card { left: 50%; right: auto; bottom: auto; top: 50%; width: 540px; max-height: 88vh; border-radius: 26px; padding: 14px 6px 22px;
    transform: translate(-50%, -50%); animation: pop .24s cubic-bezier(.2, .9, .2, 1); }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } }
  .sheet-handle { display: none; }
  .sheet .x { display: grid; }
  .toast { bottom: 28px; left: calc(50% + 124px); }
  .empty { padding: 56px 16px; }
}
@media (min-width: 860px) and (max-width: 1100px) {
  .s7, .s5, .s8, .s4 { grid-column: span 12; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
