:root {
  font-size: 12px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 1vh;
}

.container {
  background: #fff;
  padding: 0.75rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  max-width: 360px;
  width: 100%;
}

input[type='checkbox'] {
  opacity: 0;
  position: fixed;
  left: -10vw;
  top: -10vh;
}

header {
  display: block;
  margin-bottom: 1rem;
}

header>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 2.3rem;
}

header h1 {
  font-size: 1.3rem;
  margin: 0;
}

header h2 {
  font-size: 1rem;
  margin: 0;
  color: #999;
  border-bottom: 1px solid #bbb;
}

hr {
  height: .1em;
}

.header-buttons,
.header-buttons * {
  line-height: 1.2em;
}

.header-buttons i {
  font-size: 1.5rem;
  margin-left: 0.15rem;
  cursor: pointer;
  color: #333;
  opacity: .5;
}

.header-buttons i:hover {
  opacity: 1;
}

.header-buttons i.add {
  color: green;
}

.header-buttons i.margen {
  margin-left: .30em;
}


.config {
  display: none;
  margin-bottom: 0.75rem;
}

.config label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.config label span {
  flex: 1 1 50%;
  font-size: 0.9rem;
  max-width: 50%;
}

.receita-item {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  background-color: #fafafa;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.receita-item i {
  color: #888;
  min-width: 1.2rem;
  text-align: center;
}

.label-edit {
  flex: 1;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
  outline: none;
}

.label-edit.editing {
  border: 1px dashed #007bff;
  border-radius: 0.4rem;
  background-color: #eef6ff;
  padding: 0.1rem 0.3rem;
}

.receita-item input[type="text"] {
  width: 6rem;
  min-width: 50%;
  text-align: right;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #333;
}

.remove-btn {
  color: rgb(179, 0, 0) !important;
  cursor: pointer;
  font-size: 1rem;
  opacity: .5;
}

.remove-btn:hover {
  opacity: 1;
}

.resultado {
  margin-top: 1em
}

.resultado table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;  
}

.resultado td {
  padding: 0.35rem;
  border-bottom: 1px solid #ccc;
}

tr.dz_normal td {
  font-size: .9rem;
}

tr.dz_normal~tr td {
  background: #eee;  
}

tr:last-of-type td {
  background: #fff !important;
  border-bottom: none;
}

.resultado td:last-child {
  text-align: right;
}

.total-final {
  font-weight: bold;
  font-size: 1.1rem;
  color: #007bff;
}

#soma {
  font-weight: bold;
  color: #28a745;
}

@media (max-width: 600px) {
  .receita-item {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

input.cfg:checked~.config {
  display: block;
}

input.cfg:checked~header *[for="cfg"] i:before {
  content: '\f00d'
}

input.autosave:checked~header *[for="autosave"] i {
  color: orangered;
}

input.autosave:checked~header label.save {
  display: none;
}

@media print {
  .noprint {
    display: none !important;
  }
}