.ft-tool {
  max-width: 1200px;
}
.ft-toolbar,
.ft-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ft-toolbar {
  margin: 0 0 20px;
  justify-content: flex-start;
}
.ft-card {
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}
.ft-card h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
.ft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 18px 0;
}
.ft-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: #596779;
}
.ft-field input,
.ft-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #c6ced8;
  border-radius: 8px;
  background-color: #fff;
  color: #26313e;
  padding: 10px 14px;
  font: inherit;
  line-height: 24px;
  box-shadow: none;
  outline: none;
}
.ft-field input:focus,
.ft-field select:focus {
  border-color: #c6ced8;
  box-shadow: none;
  outline: none;
}
.ft-field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='20' viewBox='0 0 16 20'%3E%3Cpath d='m4 8 4-4 4 4m-8 4 4 4 4-4' fill='none' stroke='%23636b75' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.ft-field input[type="date"],
.ft-field input[type="month"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
}
.ft-field input::-webkit-date-and-time-value {
  min-height: 24px;
  text-align: left;
}
.ft-field input::-webkit-datetime-edit {
  padding: 0;
  line-height: 24px;
  display: inline-flex;
  align-items: center;
}
.ft-check {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.6;
  min-height: 46px;
}
.ft-check input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  accent-color: #616b76;
}
.ft-tool button {
  font: inherit;
  padding: 8px 14px;
  background: #fff;
  color: #354353;
  border: 1px solid #c6ced8;
  border-radius: 7px;
  cursor: pointer;
}
.ft-tool button:disabled {
  opacity: 0.45;
  cursor: default;
}
.ft-tool button:focus {
  outline: none;
  box-shadow: none;
}
.ft-tool details {
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid #e0e4e9;
}
.ft-tool summary {
  cursor: pointer;
  font-weight: 600;
  color: #455366;
}
.ft-note {
  font-size: 14px;
  line-height: 1.8;
  color: #647184;
}
.ft-error {
  font-size: 14px;
  line-height: 1.8;
  color: #993d37;
}
.ft-total {
  font-size: 28px;
  font-weight: 600;
}
.ft-result {
  border-top: 1px solid #dce1e7;
  margin-top: 20px;
  padding-top: 16px;
}
.ft-result h3 {
  font-size: 17px;
}
.ft-result li,
.ft-result p {
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.ft-tool fieldset {
  border: 1px solid #dce1e7;
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
  min-width: 0;
}
.ft-card-head > div {
  display: flex;
  gap: 8px;
}
.ft-tool a {
  color: var(--accent, #3267ad);
}
@media (max-width: 600px) {
  .ft-card {
    padding: 16px;
  }
  .ft-grid {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
  }
  .ft-toolbar {
    gap: 8px;
  }
  .ft-field input,
  .ft-field select {
    font-size: 16px;
  }
  .ft-card-head h2 {
    margin: 0;
  }
  .ft-card-head {
    margin-bottom: 18px;
  }
  .ft-field:has(input[type="date"]),
  .ft-field:has(input[type="month"]) {
    min-width: 0;
  }
}

.ft-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.ft-formula {
  font-size: 15px;
  line-height: 1.8;
  color: #455366;
}
