body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(160deg,#1e0a6c,#ffffff);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  background: #fff;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  max-width: 720px;
  width: 100%;
  overflow: hidden;
  padding-bottom: 16px;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #eee;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  background: #f3f3f3;
}

.tab.active {
  background: #2574c7;
  color: #fff;
}

.content {
  padding: 18px;
  display: none;
}

.content.active {
  display: block;
}

h2 {
  text-align: center;
  margin: 0 0 12px 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

label {
  display: block;
  text-align: center;
  font-weight: 700;
  margin-bottom: 6px;
}

input {
  width: 90%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 0 auto;
  text-align: center;
}

.buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.calc {
  background: #28a745;
  color: #fff;
}

.reset {
  background: #dc3545;
  color: #fff;
}

.resultado {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
}

@media(max-width:640px) {
  .grid { grid-template-columns: 1fr; }
  .container { margin: 10px; }
}
