:root{
  --bg1:#0b1020;
  --bg2:#111a35;
  --card: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --danger: rgba(255,70,70,.92);
  --ok: rgba(120,255,180,.92);
  --shadow: 0 18px 70px rgba(0,0,0,.45);
  --r: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: radial-gradient(1200px 800px at 20% 10%, #1b2a5a 0%, transparent 55%),
              radial-gradient(900px 700px at 90% 30%, #3d1c5a 0%, transparent 55%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow:hidden;
}

.bg{
  position:fixed; inset:-40px;
  background:
    radial-gradient(400px 300px at 30% 20%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(420px 320px at 75% 55%, rgba(255,255,255,.08), transparent 65%);
  filter: blur(10px);
  animation: float 9s ease-in-out infinite;
  pointer-events:none;
}

@keyframes float{
  0%,100%{ transform: translate3d(0,0,0) scale(1); opacity:.95; }
  50%{ transform: translate3d(10px,-12px,0) scale(1.02); opacity:1; }
}

.app{
  height:100%;
  display:flex;
  flex-direction:column;
  padding: 18px;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.top{
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:16px 12px 12px;
  gap:12px;
  position:relative;
}

/* бренд — колонка */
.brand{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-align:center;
}

/* аватарка */
.logo{
  width:64px;
  height:64px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-size:32px;

  background: rgba(255,255,255,.10);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
}

/* текст */
.text .title{
  font-size:18px;
  font-weight:600;
  line-height:1.2;
}

.text .sub{
  font-size:13px;
  opacity:.7;
}

.card{
  flex:1;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow:auto;
  backdrop-filter: blur(10px);
}

.screen{animation: pop .22s ease-out}
@keyframes pop{
  from{opacity:0; transform: translateY(8px) scale(.99)}
  to{opacity:1; transform: translateY(0) scale(1)}
}

.h1{font-size:22px; font-weight:800; margin: 0 0 8px}
.h2{font-size:16px; font-weight:700}
.hint{font-size:13px; color:var(--muted); margin-bottom:14px}

.pinBox{
  display:flex; gap:10px; justify-content:center;
  padding: 10px 0 14px;
}
.dot{
  width:14px;height:14px;border-radius:999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  transition: transform .12s ease, background .12s ease;
}
.dot.on{ background: rgba(255,255,255,.92); transform: scale(1.08); }

.keypad{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 14px;
}
.key{
  height:54px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
  transition: transform .08s ease, background .12s ease;
}
.key:active{ transform: scale(.98); background: rgba(255,255,255,.10); }

.row{display:flex; gap:10px; align-items:center}
.row.between{justify-content:space-between}
.row.tight{gap:8px}
.btn{
  flex:1;
  height:44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-weight: 700;
  cursor:pointer;
}
.btn:active{ transform: scale(.99) }
.btn.primary{
  background: rgba(255,255,255,.92);
  color:#0c1224;
  border-color: rgba(255,255,255,.92);
}
.btn.danger{
  background: rgba(255,70,70,.92);
  border-color: rgba(255,70,70,.92);
  color:#160a0a;
}
.ghost{
  height:40px;
  padding:0 12px;
  border-radius: 12px;
  background: transparent;
  border:1px solid var(--stroke);
  color:var(--text);
  cursor:pointer;
}

.select{
  flex:1;
  height:44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 0 10px;
  outline:none;
}

.sep{height:1px; background: rgba(255,255,255,.10); margin:14px 0}

.list{display:flex; flex-direction:column; gap:10px}
.item{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}
.item .left{display:flex; align-items:center; gap:10px}
.chk{
  width:20px;height:20px;border-radius:7px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  display:grid; place-items:center;
  cursor:pointer;
}
.chk.on{ background: rgba(255,255,255,.92); color:#0c1224; }
.badge{
  font-size:12px;
  padding: 4px 8px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  color: var(--muted);
}
.sum{font-weight:800}

.mini{display:flex; gap:8px; padding-top: 5px; flex-wrap:wrap}
.chip{
  font-size:12px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
#removedInfo{
  white-space: pre-line;
  text-align: left;
}

.msg{margin-top:10px; font-size:13px; color:var(--muted); min-height:18px}
.foot{padding: 0 8px 8px; display:flex; flex-direction:column; align-items:center;}
.muted{color:var(--muted); font-size:12px}
