:root {
  --bg: #0e141c;
  --card: #111827;
  --muted: #94a3b8;
  --accent: #7dd3fc;
  --accent-2: #60a5fa;
  --glass: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial
}

body {
  background: linear-gradient(180deg, var(--bg), #071023);
  color: #e6eef8;
  display: flex;
  flex-direction: column;
  align-items: center
}

.site-header {
  width: 100%;
  max-width: 980px;
  padding: 28px 16px;
  text-align: center
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 8px
}

.container {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  width: 100%;
  max-width: 980px;
  padding: 12px
}

.calculator-card {
  background: var(--card);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6)
}

.history-card {
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  height: max-content
}

.row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px
}

.row label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px
}

.row input,
.row select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--glass);
  color: inherit
}

.actions {
  display: flex;
  gap: 10px
}

button {
  cursor: pointer;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #02203a;
  font-weight: 600
}

button[type="button"] {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 8px 10px
}

.result-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02)
}

.resultado {
  font-size: 20px;
  padding: 10px
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.history-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  max-height: 360px;
  overflow: auto
}

.history-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  gap: 12px
}

.small-muted {
  font-size: 12px;
  color: var(--muted)
}

.site-footer {
  width: 100%;
  max-width: 980px;
  padding: 16px;
  text-align: center;
  color: var(--muted)
}

@media (max-width:900px) {
  .container {
    grid-template-columns: 1fr;
  }

  .history-card {
    order: 2
  }
}