*{
  box-sizing:border-box;
  font-family: Inter, system-ui, sans-serif;
}

body{
  margin:0;
  min-height:100vh;
  background:#020617;
  overflow-y:auto;
}

/* BACKGROUND */
.bg{
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at 20% 20%, #6366f1, transparent 40%),
    radial-gradient(circle at 80% 80%, #9333ea, transparent 40%);
  filter:blur(120px);
}

/* APP WRAPPER */
.app{
  width:390px;
  margin:40px auto;
  z-index:1;
}

/* HEADER */
.header{
  text-align:center;
  color:white;
  margin-bottom:25px;
}

/* BRAND ROW */
.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom:6px;
}

.app-logo{
  width:42px;
  height:42px;
  object-fit:contain;
}

.header h1{
  margin:0;
  font-size:32px;
  letter-spacing:1px;
}

.header p{
  margin-top:4px;
  color:#c7d2fe;
}

/* CARD */
.card{
  background:rgba(255,255,255,0.08);
  backdrop-filter:blur(18px);
  border-radius:20px;
  padding:22px;
  margin-bottom:18px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.15),
    0 20px 40px rgba(0,0,0,0.5);
  color:white;
}

/* INPUT GROUP */
.input-group{
  position:relative;
  margin-bottom:18px;
}

.input-group input{
  width:100%;
  padding:14px 12px;
  background:rgba(255,255,255,0.15);
  border:none;
  border-radius:12px;
  color:white;
  outline:none;
}

.input-group label{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#c7d2fe;
  pointer-events:none;
  transition:0.2s;
}

.input-group input:focus + label,
.input-group input:valid + label{
  top:-8px;
  background:#020617;
  padding:0 6px;
  font-size:12px;
}

/* PERSON ROW */
.person-row{
  display:flex;
  gap:8px;
  margin-bottom:8px;
  animation:fade 0.3s ease;
}

.person-row input{
  flex:1;
  padding:12px;
  border-radius:10px;
  border:none;
  background:rgba(255,255,255,0.15);
  color:white;
}

.person-row button{
  background:#ef4444;
  border:none;
  color:white;
  border-radius:10px;
  padding:0 12px;
  cursor:pointer;
}

/* BUTTONS */
.add{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px dashed #a5b4fc;
  background:transparent;
  color:#a5b4fc;
  margin-bottom:10px;
  cursor:pointer;
}

.calc{
  width:100%;
  padding:14px;
  border-radius:14px;
  border:none;
  background:linear-gradient(135deg,#6366f1,#9333ea);
  color:white;
  font-size:15px;
  cursor:pointer;
  transition:transform .15s;
}

.calc:hover{
  transform:scale(1.04);
}

/* TABLE */
table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:10px;
  border-bottom:1px solid rgba(255,255,255,0.2);
}

th{
  color:#c7d2fe;
  text-align:left;
}

.error{
  color:#fca5a5;
  font-weight:600;
}

/* MOBILE */
@media (max-width:480px){
  .app{
    width:92%;
    margin:20px auto;
  }

  .app-logo{
    width:36px;
    height:36px;
  }

  .header h1{
    font-size:26px;
  }

  .person-row{
    flex-direction:column;
  }

  .person-row button{
    width:100%;
    padding:10px;
  }
}

/* ANIMATION */
@keyframes fade{
  from{opacity:0; transform:translateY(6px);}
  to{opacity:1; transform:translateY(0);}
}
