/* Header & Bank Card Style */
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.top h1 { margin: 0; font-size: 22px; font-weight: 800; }
.top small { color: var(--mu); font-weight: 600; }
.balance-card { background: linear-gradient(135deg, #1e40af, #3b82f6); color: #ffffff; border-radius: 24px; padding: 22px; margin-bottom: 20px; box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.4); }
.balance-card small { opacity: 0.85; font-size: 14px; display: block; margin-bottom: 4px; }
.balance-card b { font-size: 42px; display: block; line-height: 1.1; margin-bottom: 18px; font-weight: 800; }

/* Quick Actions (Bank Style) */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.qa-btn { background: var(--card); border: 1px solid var(--bd); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03); border-radius: 18px; padding: 14px 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: 0.2s; }
.qa-btn:active { transform: scale(0.96); background: var(--acl); }
.qa-btn .icon { width: 50px; height: 50px; border-radius: 16px; background: var(--acl); display: grid; place-items: center; font-size: 24px; color: var(--act); }
.qa-btn span { font-size: 12px; font-weight: 700; color: var(--tx); }

.hero { background: var(--ac); color: #fff; border-radius: 20px; padding: 20px; margin-bottom: 14px; box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.3); }
.hero.bad { background: var(--rd); box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.3); }
.hero small { opacity: .9; font-size: 15px; display: block; }
.hero b { font-size: 38px; display: block; line-height: 1.2; font-weight: 800; }
.hero .sub { display: flex; gap: 10px; margin-top: 12px; }
.hero .sub div { flex: 1; background: #ffffff26; border-radius: 14px; padding: 10px; font-size: 14px; }
.hero .sub b { font-size: 18px; display: block; margin-top: 4px;}

.card { background: var(--card); border: 1px solid var(--bd); border-radius: 20px; padding: 14px; margin-bottom: 14px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03); }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--bd); }
.item:last-child { border: 0; }
.item .nm { flex: 1; min-width: 0; }
.item .nm b { display: block; overflow-wrap: anywhere; font-size: 16px; }
.item .nm small { color: var(--mu); font-size: 13px; }
.amt { font-weight: 800; white-space: nowrap; font-size: 17px; }

.big { display: block; width: 100%; padding: 16px; border: 0; border-radius: 16px; background: var(--ac); color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; margin: 8px 0; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); transition: 0.2s; }
.big:active { transform: translateY(2px); }
.big.y { background: var(--yl); color: #3a2d00; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25); }
.big.o { background: var(--card); color: var(--act); border: 2px solid var(--ac); box-shadow: none; }
.cancel { display: block; width: 100%; padding: 14px; border: 0; background: none; color: var(--mu); font: inherit; font-weight: 600; cursor: pointer; }

.ib { border: 0; background: var(--acl); color: var(--act); border-radius: 12px; min-width: 44px; height: 44px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; padding: 0 10px; }
.ib.r { background: var(--rdl); color: var(--rdt); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc { background: var(--card); border: 1px solid var(--bd); border-radius: 18px; padding: 16px 10px; text-align: center; font: inherit; color: var(--tx); cursor: pointer; min-height: 104px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.pc:active { border-color: var(--ac); background: var(--acl); }
.pc .e { font-size: 32px; display: block; margin-bottom: 8px; }
.pc b { display: block; overflow-wrap: anywhere; font-weight: 700; }
.pc.out { opacity: .45; }
.alert { background: var(--yll); border: 1px solid var(--yl); border-radius: 16px; padding: 14px; margin-bottom: 16px; color: #92400e; box-shadow: 0 4px 6px rgba(245, 158, 11, 0.1); }
.empty { color: var(--mu); text-align: center; padding: 30px 10px; font-weight: 600; }

input, select { width: 100%; padding: 16px; border: 2px solid var(--bd); border-radius: 16px; background: var(--bg); color: var(--tx); font: inherit; font-size: 17px; transition: 0.2s; }
input:focus { outline: 0; border-color: var(--ac); background: var(--card); box-shadow: 0 0 0 4px var(--acl); }
label { display: block; font-weight: 700; margin: 14px 0 4px; font-size: 15px; }
.hint { display: block; color: var(--mu); font-size: 13px; margin-bottom: 8px; }
.search { margin-bottom: 14px; }

#m { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); display: none; align-items: flex-end; justify-content: center; z-index: 20; backdrop-filter: blur(3px); }
#m.on { display: flex; }
.sheet { background: var(--card); width: 100%; max-width: 640px; border-radius: 28px 28px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 92%; overflow: auto; box-shadow: 0 -10px 40px rgba(0,0,0,0.1); animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet h3 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
.total { text-align: center; font-size: 28px; font-weight: 800; color: var(--act); margin: 12px 0; background: var(--acl); padding: 16px; border-radius: 20px; }

nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--bd); display: flex; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 10; box-shadow: 0 -4px 20px rgba(0,0,0,0.04); }
nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
nav button { flex: 0 0 auto; min-width: 68px; border: 0; background: none; padding: 10px 6px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--mu); cursor: pointer; transition: 0.2s; white-space: nowrap; text-align: center; }
nav button span { display: block; font-size: 24px; line-height: 1.3; margin-bottom: 2px; }
nav button.on { color: var(--act); font-weight: 800; }

#t { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 14px 24px; border-radius: 30px; font-weight: 700; display: none; z-index: 30; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
#t.on { display: block; animation: pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes pop { 0% { transform: translate(-50%, 20px) scale(0.9); opacity: 0; } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }

.ch { display: flex; gap: 8px; } .ch button { flex: 1; }
.prod { background: var(--card); border: 1px solid var(--bd); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-height: 190px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: 0.2s; }
.prod.in { border-color: var(--ac); background: var(--acl); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15); }
.prod.out { opacity: .5; cursor: default; }
.av { width: 50px; height: 50px; border-radius: 16px; color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center; margin-bottom: 4px; }
.prod b { font-size: 17px; overflow-wrap: anywhere; line-height: 1.3; font-weight: 700; }
.pr { font-size: 22px; font-weight: 800; color: var(--act); }
.stk { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; align-self: flex-start; }
.stk.ok { background: var(--acl); color: var(--act); } .prod.in .stk.ok { background: var(--card); }
.stk.low { background: var(--yll); color: #b45309; } .stk.no { background: var(--rdl); color: var(--rdt); }
.add { margin-top: auto; text-align: center; background: var(--ac); color: #fff; border-radius: 14px; padding: 12px; font-weight: 700; font-size: 15px;}
.qc { margin-top: auto; display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 14px; padding: 6px; }
.qc button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--ac); color: #fff; font-size: 24px; font-weight: 700; cursor: pointer; }
.qc span { font-size: 22px; font-weight: 800; }

.cb { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: 608px; margin: 0 auto; background: var(--tx); color: var(--bg); border-radius: 24px; padding: 12px 12px 12px 24px; display: flex; align-items: center; justify-content: space-between; z-index: 9; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.cb small { display: block; opacity: .8; font-weight: 600; } .cb b { font-size: 24px; font-weight: 800; }
.cb button { border: 0; background: var(--ac); color: #fff; font: inherit; font-weight: 800; font-size: 18px; padding: 16px 28px; border-radius: 18px; cursor: pointer; }
.change { text-align: center; font-size: 22px; margin: 12px 0; min-height: 32px; font-weight: 700; }

.rw { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--bd); cursor: pointer; border-radius: 16px; }
.rw:last-child { border: 0; } .rw.in { background: var(--acl); } .rw.out { opacity: .5; cursor: default; }
.rw .nm { flex: 1; min-width: 0; } .rw .nm b { display: block; overflow-wrap: anywhere; font-size: 16px; font-weight: 700;} .rw .nm small { color: var(--mu); font-weight: 600;}
.av.sm { width: 44px; height: 44px; font-size: 20px; margin: 0; flex: none; border-radius: 14px; }
.qc.sm { margin: 0; gap: 6px; flex: none; } .qc.sm button { width: 40px; height: 40px; border-radius: 10px;} .qc.sm span { min-width: 32px; text-align: center; font-size: 20px; }
.addb { width: 44px; height: 44px; border-radius: 14px; background: var(--ac); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: none; }

.stick { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); padding: 12px 0; z-index: 5; display: flex; gap: 10px; margin-top: -4px; }
.stick input { flex: 1; } .vt { border: 1px solid var(--bd); background: var(--card); border-radius: 16px; width: 60px; font-size: 24px; cursor: pointer; color: var(--tx); }
.sb { background: var(--bg); border-radius: 14px; margin: 4px 0 8px; padding: 4px; }
.row3 { display: flex; gap: 10px; margin-bottom: 16px; } .row3 .ib { height: 56px; min-width: 56px; }
.seg { display: flex; background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 6px; gap: 6px; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.02);}
.seg button { flex: 1; border: 0; background: none; padding: 12px 4px; border-radius: 12px; font: inherit; font-weight: 700; color: var(--mu); cursor: pointer; } .seg button.on { background: var(--ac); color: #fff; box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2); }
.st { background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.02);} .st small { display: block; color: var(--mu); font-size: 13px; font-weight: 600;} .st b { font-size: 22px; font-weight: 800; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 2px solid var(--bd); padding-bottom: 4px;} .bars i { flex: 1; background: var(--ac); border-radius: 6px 6px 0 0; }
.bl { display: flex; gap: 4px; font-size: 11px; font-weight: 700; color: var(--mu); text-align: center; margin-top: 6px; } .bl span { flex: 1; overflow: hidden; }
.bar { height: 10px; background: var(--acl); border-radius: 8px; overflow: hidden; margin: 6px 0; } .bar i { display: block; height: 100%; background: var(--ac); border-radius: 8px; } .bar.r { background: var(--rdl); } .bar.r i { background: var(--rd); }
.mu { color: var(--mu); margin: 8px 0 0; font-weight: 600;} .row2 { display: flex; justify-content: space-between; gap: 8px; } .pi { padding: 12px 0; border-bottom: 1px solid var(--bd); } .pi:last-child { border: 0; } .pi small { color: var(--mu); font-weight: 600; }
.mini{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.mini span{background:rgba(255,255,255,.16);padding:6px 12px;border-radius:20px;font-size:13px;font-weight:700}
.rowl{display:flex;align-items:center;gap:12px;width:100%;background:var(--card);border:1px solid var(--bd);border-radius:18px;padding:14px;font:inherit;color:var(--tx);cursor:pointer;margin-bottom:10px;text-align:left;box-shadow:0 2px 6px rgba(0,0,0,.03)}
.rowl:active{background:var(--acl)}.rowl .ic{width:44px;height:44px;border-radius:14px;background:var(--acl);display:grid;place-items:center;font-size:22px;flex:none}
.rowl .tx{flex:1;min-width:0}.rowl .tx b{display:block}.rowl .tx small{color:var(--mu);font-weight:600}.rowl .chv{color:var(--mu);font-size:26px}
.mini2{display:flex;gap:10px;margin-top:16px}.mini2 div{flex:1;background:rgba(255,255,255,.16);border-radius:14px;padding:10px 12px}
.balance-card .mini2 small{font-size:12px;margin:0}.balance-card .mini2 b{font-size:17px;margin:2px 0 0;font-weight:800}
.sec-h{display:flex;justify-content:space-between;align-items:center;margin:22px 0 10px}.sec-h h2{margin:0;font-size:18px;font-weight:800}
.sli{display:flex;gap:12px;align-items:center;padding:12px 4px;border-bottom:1px solid var(--bd)}.sli:last-child{border:0}
.slb{flex:1;min-width:0}.slb small{color:var(--mu);font-weight:600}.slv{color:var(--act)}.slb .bar{height:6px;margin:6px 0 4px}
.auth{max-width:420px;margin:5vh auto 0}.auth .logo{font-size:56px;text-align:center}.auth h1{text-align:center;margin:0 0 4px;font-size:30px}
nav button{position:relative}.bdg2{position:absolute;top:4px;left:calc(50% + 8px);background:var(--rd);color:#fff;border-radius:10px;font-size:11px;font-style:normal;font-weight:800;padding:1px 6px}
.row{display:flex;gap:8px;flex-wrap:wrap}.bdg{color:#fff;border-radius:20px;padding:2px 10px;font-size:12px;font-weight:700;white-space:nowrap}
.shot{width:100%;max-height:220px;object-fit:cover;border-radius:12px;margin:10px 0;border:1px solid var(--bd);cursor:zoom-in}
